1*530d68baSNigel Croxon #ifndef _EFI_GPT_H 2*530d68baSNigel Croxon #define _EFI_GPT_H 3*530d68baSNigel Croxon /*++ 4*530d68baSNigel Croxon 5*530d68baSNigel Croxon Copyright (c) 1998 Intel Corporation 6*530d68baSNigel Croxon 7*530d68baSNigel Croxon Module Name: 8*530d68baSNigel Croxon 9*530d68baSNigel Croxon EfiGpt.h 10*530d68baSNigel Croxon 11*530d68baSNigel Croxon Abstract: 12*530d68baSNigel Croxon Include file for EFI partitioning scheme 13*530d68baSNigel Croxon 14*530d68baSNigel Croxon 15*530d68baSNigel Croxon 16*530d68baSNigel Croxon Revision History 17*530d68baSNigel Croxon 18*530d68baSNigel Croxon --*/ 19*530d68baSNigel Croxon 20*530d68baSNigel Croxon #define PRIMARY_PART_HEADER_LBA 1 21*530d68baSNigel Croxon 22*530d68baSNigel Croxon typedef struct { 23*530d68baSNigel Croxon EFI_TABLE_HEADER Header; 24*530d68baSNigel Croxon EFI_LBA MyLBA; 25*530d68baSNigel Croxon EFI_LBA AlternateLBA; 26*530d68baSNigel Croxon EFI_LBA FirstUsableLBA; 27*530d68baSNigel Croxon EFI_LBA LastUsableLBA; 28*530d68baSNigel Croxon EFI_GUID DiskGUID; 29*530d68baSNigel Croxon EFI_LBA PartitionEntryLBA; 30*530d68baSNigel Croxon UINT32 NumberOfPartitionEntries; 31*530d68baSNigel Croxon UINT32 SizeOfPartitionEntry; 32*530d68baSNigel Croxon UINT32 PartitionEntryArrayCRC32; 33*530d68baSNigel Croxon } EFI_PARTITION_TABLE_HEADER; 34*530d68baSNigel Croxon 35*530d68baSNigel Croxon #define EFI_PTAB_HEADER_ID "EFI PART" 36*530d68baSNigel Croxon 37*530d68baSNigel Croxon typedef struct { 38*530d68baSNigel Croxon EFI_GUID PartitionTypeGUID; 39*530d68baSNigel Croxon EFI_GUID UniquePartitionGUID; 40*530d68baSNigel Croxon EFI_LBA StartingLBA; 41*530d68baSNigel Croxon EFI_LBA EndingLBA; 42*530d68baSNigel Croxon UINT64 Attributes; 43*530d68baSNigel Croxon CHAR16 PartitionName[36]; 44*530d68baSNigel Croxon } EFI_PARTITION_ENTRY; 45*530d68baSNigel Croxon 46*530d68baSNigel Croxon // 47*530d68baSNigel Croxon // EFI Partition Attributes 48*530d68baSNigel Croxon // 49*530d68baSNigel Croxon #define EFI_PART_USED_BY_EFI 0x0000000000000001 50*530d68baSNigel Croxon #define EFI_PART_REQUIRED_TO_FUNCTION 0x0000000000000002 51*530d68baSNigel Croxon #define EFI_PART_USED_BY_OS 0x0000000000000004 52*530d68baSNigel Croxon #define EFI_PART_REQUIRED_BY_OS 0x0000000000000008 53*530d68baSNigel Croxon #define EFI_PART_BACKUP_REQUIRED 0x0000000000000010 54*530d68baSNigel Croxon #define EFI_PART_USER_DATA 0x0000000000000020 55*530d68baSNigel Croxon #define EFI_PART_CRITICAL_USER_DATA 0x0000000000000040 56*530d68baSNigel Croxon #define EFI_PART_REDUNDANT_PARTITION 0x0000000000000080 57*530d68baSNigel Croxon 58*530d68baSNigel Croxon #define EFI_PART_TYPE_UNUSED_GUID \ 59*530d68baSNigel Croxon { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} } 60*530d68baSNigel Croxon 61*530d68baSNigel Croxon #define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \ 62*530d68baSNigel Croxon { 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} } 63*530d68baSNigel Croxon 64*530d68baSNigel Croxon #define EFI_PART_TYPE_LEGACY_MBR_GUID \ 65*530d68baSNigel Croxon { 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f} } 66*530d68baSNigel Croxon 67*530d68baSNigel Croxon #endif 68*530d68baSNigel Croxon 69