1 1.1.1.1.4.2 rmind /* $NetBSD: efipart.h,v 1.1.1.1.4.2 2014/05/18 17:46:02 rmind Exp $ */ 2 1.1.1.1.4.2 rmind 3 1.1.1.1.4.2 rmind #ifndef _EFI_PART_H 4 1.1.1.1.4.2 rmind #define _EFI_PART_H 5 1.1.1.1.4.2 rmind 6 1.1.1.1.4.2 rmind /*++ 7 1.1.1.1.4.2 rmind 8 1.1.1.1.4.2 rmind Copyright (c) 1998 Intel Corporation 9 1.1.1.1.4.2 rmind 10 1.1.1.1.4.2 rmind Module Name: 11 1.1.1.1.4.2 rmind 12 1.1.1.1.4.2 rmind efipart.h 13 1.1.1.1.4.2 rmind 14 1.1.1.1.4.2 rmind Abstract: 15 1.1.1.1.4.2 rmind Info about disk partitions and Master Boot Records 16 1.1.1.1.4.2 rmind 17 1.1.1.1.4.2 rmind 18 1.1.1.1.4.2 rmind 19 1.1.1.1.4.2 rmind 20 1.1.1.1.4.2 rmind Revision History 21 1.1.1.1.4.2 rmind 22 1.1.1.1.4.2 rmind --*/ 23 1.1.1.1.4.2 rmind 24 1.1.1.1.4.2 rmind // 25 1.1.1.1.4.2 rmind // 26 1.1.1.1.4.2 rmind // 27 1.1.1.1.4.2 rmind 28 1.1.1.1.4.2 rmind #define EFI_PARTITION 0xef 29 1.1.1.1.4.2 rmind #define MBR_SIZE 512 30 1.1.1.1.4.2 rmind 31 1.1.1.1.4.2 rmind #pragma pack(1) 32 1.1.1.1.4.2 rmind 33 1.1.1.1.4.2 rmind typedef struct { 34 1.1.1.1.4.2 rmind UINT8 BootIndicator; 35 1.1.1.1.4.2 rmind UINT8 StartHead; 36 1.1.1.1.4.2 rmind UINT8 StartSector; 37 1.1.1.1.4.2 rmind UINT8 StartTrack; 38 1.1.1.1.4.2 rmind UINT8 OSIndicator; 39 1.1.1.1.4.2 rmind UINT8 EndHead; 40 1.1.1.1.4.2 rmind UINT8 EndSector; 41 1.1.1.1.4.2 rmind UINT8 EndTrack; 42 1.1.1.1.4.2 rmind UINT8 StartingLBA[4]; 43 1.1.1.1.4.2 rmind UINT8 SizeInLBA[4]; 44 1.1.1.1.4.2 rmind } MBR_PARTITION_RECORD; 45 1.1.1.1.4.2 rmind 46 1.1.1.1.4.2 rmind #define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24)) 47 1.1.1.1.4.2 rmind 48 1.1.1.1.4.2 rmind #define MBR_SIGNATURE 0xaa55 49 1.1.1.1.4.2 rmind #define MIN_MBR_DEVICE_SIZE 0x80000 50 1.1.1.1.4.2 rmind #define MBR_ERRATA_PAD 0x40000 // 128 MB 51 1.1.1.1.4.2 rmind 52 1.1.1.1.4.2 rmind #define MAX_MBR_PARTITIONS 4 53 1.1.1.1.4.2 rmind typedef struct { 54 1.1.1.1.4.2 rmind UINT8 BootStrapCode[440]; 55 1.1.1.1.4.2 rmind UINT8 UniqueMbrSignature[4]; 56 1.1.1.1.4.2 rmind UINT8 Unknown[2]; 57 1.1.1.1.4.2 rmind MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]; 58 1.1.1.1.4.2 rmind UINT16 Signature; 59 1.1.1.1.4.2 rmind } MASTER_BOOT_RECORD; 60 1.1.1.1.4.2 rmind #pragma pack() 61 1.1.1.1.4.2 rmind 62 1.1.1.1.4.2 rmind 63 1.1.1.1.4.2 rmind #endif 64