]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiGpt.h
correct a operation mistake
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiGpt.h
index f97030cf2283775e39fa58641dea9bd0e5526e0f..59704e3362500ec31493d2c3d517226869a9f45e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI Guid Partition Table Format Definition.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
+  Copyright (c) 2006 - 2008, Intel Corporation\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef __UEFI_GPT_H__\r
 #define __UEFI_GPT_H__\r
 \r
+///\r
+/// The primary GUID Partition Table Header must be\r
+/// located in LBA 1 (i.e., the second logical block).\r
+///\r
 #define PRIMARY_PART_HEADER_LBA 1\r
-\r
 ///\r
 /// EFI Partition Table Signature: "EFI PART"\r
 /// \r
-#define EFI_PTAB_HEADER_ID      0x5452415020494645ULL\r
+#define EFI_PTAB_HEADER_ID      SIGNATURE_64 ('E','F','I',' ','P','A','R','T')\r
 \r
 #pragma pack(1)\r
 \r
 /// GPT Partition Table Header\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// The table header for the GPT partition Table.\r
+  /// This header contains EFI_PTAB_HEADER_ID\r
+  ///\r
   EFI_TABLE_HEADER  Header;\r
+  ///\r
+  /// The LBA that contains this data structure.\r
+  ///\r
   EFI_LBA           MyLBA;\r
+  ///\r
+  /// LBA address of the alternate GUID Partition Table Header.\r
+  ///\r
   EFI_LBA           AlternateLBA;\r
+  ///\r
+  /// The first usable logical block that may be used\r
+  /// by a partition described by a GUID Partition Entry.\r
+  ///\r
   EFI_LBA           FirstUsableLBA;\r
+  ///\r
+  /// The last usable logical block that may be used\r
+  /// by a partition described by a GUID Partition Entry.\r
+  ///\r
   EFI_LBA           LastUsableLBA;\r
+  ///\r
+  /// GUID that can be used to uniquely identify the disk.\r
+  ///\r
   EFI_GUID          DiskGUID;\r
+  ///\r
+  /// The starting LBA of the GUID Partition Entry array.\r
+  ///\r
   EFI_LBA           PartitionEntryLBA;\r
+  ///\r
+  /// The number of Partition Entries in the GUID Partition Entry array.\r
+  ///\r
   UINT32            NumberOfPartitionEntries;\r
+  ///\r
+  /// The size, in bytes, of each the GUID Partition\r
+  /// Entry structures in the GUID Partition Entry\r
+  /// array. Must be a multiple of 8.\r
+  ///\r
   UINT32            SizeOfPartitionEntry;\r
+  ///\r
+  /// The CRC32 of the GUID Partition Entry array.\r
+  /// Starts at PartitionEntryLBA and is\r
+  /// computed over a byte length of\r
+  /// NumberOfPartitionEntries * SizeOfPartitionEntry.\r
+  ///\r
   UINT32            PartitionEntryArrayCRC32;\r
 } EFI_PARTITION_TABLE_HEADER;\r
 \r
@@ -44,22 +85,38 @@ typedef struct {
 /// GPT Partition Entry\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// Unique ID that defines the purpose and type of this Partition. A value of\r
+  /// zero defines that this partition entry is not being used.\r
+  ///\r
   EFI_GUID  PartitionTypeGUID;\r
+  ///\r
+  /// GUID that is unique for every partition entry. Every partition ever\r
+  /// created will have a unique GUID.\r
+  /// This GUID must be assigned when the GUID Partition Entry is created.\r
+  ///\r
   EFI_GUID  UniquePartitionGUID;\r
+  ///\r
+  /// Starting LBA of the partition defined by this entry\r
+  ///\r
   EFI_LBA   StartingLBA;\r
+  ///\r
+  /// Ending LBA of the partition defined by this entry.\r
+  ///\r
   EFI_LBA   EndingLBA;\r
+  ///\r
+  /// Attribute bits, all bits reserved by UEFI\r
+  /// Bit 0 Required for the platform to function.\r
+  /// Bits 1-47 Undefined and must be zero.\r
+  /// Bits 48-63 Reserved for GUID specific use.\r
+  ///\r
   UINT64    Attributes;\r
+  ///\r
+  /// Unicode string.\r
+  ///\r
   CHAR16    PartitionName[36];\r
 } EFI_PARTITION_ENTRY;\r
 \r
-///\r
-/// GPT Partition Entry Status\r
-///\r
-typedef struct {\r
-  BOOLEAN OutOfRange;\r
-  BOOLEAN Overlap;\r
-} EFI_PARTITION_ENTRY_STATUS;\r
-\r
 #pragma pack()\r
 #endif\r
 \r