2 EFI Guid Partition Table Format Definition.
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __UEFI_GPT_H__
16 #define __UEFI_GPT_H__
19 /// The primary GUID Partition Table Header must be
20 /// located in LBA 1 (i.e., the second logical block).
22 #define PRIMARY_PART_HEADER_LBA 1
24 /// EFI Partition Table Signature: "EFI PART".
26 #define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T')
31 /// GPT Partition Table Header.
35 /// The table header for the GPT partition Table.
36 /// This header contains EFI_PTAB_HEADER_ID.
38 EFI_TABLE_HEADER Header
;
40 /// The LBA that contains this data structure.
44 /// LBA address of the alternate GUID Partition Table Header.
48 /// The first usable logical block that may be used
49 /// by a partition described by a GUID Partition Entry.
51 EFI_LBA FirstUsableLBA
;
53 /// The last usable logical block that may be used
54 /// by a partition described by a GUID Partition Entry.
56 EFI_LBA LastUsableLBA
;
58 /// GUID that can be used to uniquely identify the disk.
62 /// The starting LBA of the GUID Partition Entry array.
64 EFI_LBA PartitionEntryLBA
;
66 /// The number of Partition Entries in the GUID Partition Entry array.
68 UINT32 NumberOfPartitionEntries
;
70 /// The size, in bytes, of each the GUID Partition
71 /// Entry structures in the GUID Partition Entry
72 /// array. Must be a multiple of 8.
74 UINT32 SizeOfPartitionEntry
;
76 /// The CRC32 of the GUID Partition Entry array.
77 /// Starts at PartitionEntryLBA and is
78 /// computed over a byte length of
79 /// NumberOfPartitionEntries * SizeOfPartitionEntry.
81 UINT32 PartitionEntryArrayCRC32
;
82 } EFI_PARTITION_TABLE_HEADER
;
85 /// GPT Partition Entry.
89 /// Unique ID that defines the purpose and type of this Partition. A value of
90 /// zero defines that this partition entry is not being used.
92 EFI_GUID PartitionTypeGUID
;
94 /// GUID that is unique for every partition entry. Every partition ever
95 /// created will have a unique GUID.
96 /// This GUID must be assigned when the GUID Partition Entry is created.
98 EFI_GUID UniquePartitionGUID
;
100 /// Starting LBA of the partition defined by this entry
104 /// Ending LBA of the partition defined by this entry.
108 /// Attribute bits, all bits reserved by UEFI
109 /// Bit 0: If this bit is set, the partition is required for the platform to function. The owner/creator of the
110 /// partition indicates that deletion or modification of the contents can result in loss of platform
111 /// features or failure for the platform to boot or operate. The system cannot function normally if
112 /// this partition is removed, and it should be considered part of the hardware of the system.
113 /// Actions such as running diagnostics, system recovery, or even OS install or boot, could
114 /// potentially stop working if this partition is removed. Unless OS software or firmware
115 /// recognizes this partition, it should never be removed or modified as the UEFI firmware or
116 /// platform hardware may become non-functional.
117 /// Bit 1: If this bit is set firmware must not produce an EFI_BLOCK_IO_PROTOCOL device for
118 /// this partition. By not producing EFI_BLOCK_IO_PROTOCOL partition, file system
119 /// mappings will not be created for this partition in UEFI.
120 /// Bits 2-47: Undefined and must be zero. Reserved for expansion by future versions of the UEFI
122 /// Bits 48-63: Reserved for GUID specific use. The use of these bits will vary depending on the
123 /// PartitionTypeGUID. Only the owner of the PartitionTypeGUID is allowed
124 /// to modify these bits. They must be preserved if Bits 0-47 are modified..
128 /// Null-terminated name of the partition.
130 CHAR16 PartitionName
[36];
131 } EFI_PARTITION_ENTRY
;