efigpt.h 1.8 KB

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