]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Uefi/UefiGpt.h
1)update function header coding style issue
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiGpt.h
CommitLineData
c311f86b 1/** @file\r
959ccb23 2 EFI Guid Partition Table Format Definition.\r
3\r
e0c047a0 4 Copyright (c) 2006 - 2008, Intel Corporation\r
959ccb23 5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
959ccb23 13**/\r
14\r
15#ifndef __UEFI_GPT_H__\r
16#define __UEFI_GPT_H__\r
17\r
e0c047a0 18///\r
19/// The primary GUID Partition Table Header must be\r
20/// located in LBA 1 (i.e., the second logical block).\r
21///\r
959ccb23 22#define PRIMARY_PART_HEADER_LBA 1\r
23\r
8b13229b 24///\r
25/// EFI Partition Table Signature: "EFI PART"\r
26/// \r
959ccb23 27#define EFI_PTAB_HEADER_ID 0x5452415020494645ULL\r
28\r
29#pragma pack(1)\r
8b13229b 30\r
31///\r
32/// GPT Partition Table Header\r
33///\r
959ccb23 34typedef struct {\r
1bf79370
LG
35 ///\r
36 /// The table header for the GPT partition Table.\r
37 /// This header contains EFI_PTAB_HEADER_ID\r
38 ///\r
959ccb23 39 EFI_TABLE_HEADER Header;\r
1bf79370
LG
40 ///\r
41 /// The LBA that contains this data structure.\r
42 ///\r
959ccb23 43 EFI_LBA MyLBA;\r
1bf79370
LG
44 ///\r
45 /// LBA address of the alternate GUID Partition Table Header.\r
46 ///\r
959ccb23 47 EFI_LBA AlternateLBA;\r
1bf79370
LG
48 ///\r
49 /// The first usable logical block that may be used\r
50 /// by a partition described by a GUID Partition Entry.\r
51 ///\r
959ccb23 52 EFI_LBA FirstUsableLBA;\r
1bf79370
LG
53 ///\r
54 /// The last usable logical block that may be used\r
55 /// by a partition described by a GUID Partition Entry.\r
56 ///\r
959ccb23 57 EFI_LBA LastUsableLBA;\r
1bf79370
LG
58 ///\r
59 /// GUID that can be used to uniquely identify the disk.\r
60 ///\r
959ccb23 61 EFI_GUID DiskGUID;\r
1bf79370
LG
62 ///\r
63 /// The starting LBA of the GUID Partition Entry array.\r
64 ///\r
959ccb23 65 EFI_LBA PartitionEntryLBA;\r
1bf79370
LG
66 ///\r
67 /// The number of Partition Entries in the GUID Partition Entry array.\r
68 ///\r
959ccb23 69 UINT32 NumberOfPartitionEntries;\r
1bf79370
LG
70 ///\r
71 /// The size, in bytes, of each the GUID Partition\r
72 /// Entry structures in the GUID Partition Entry\r
73 /// array. Must be a multiple of 8.\r
74 ///\r
959ccb23 75 UINT32 SizeOfPartitionEntry;\r
1bf79370
LG
76 ///\r
77 /// The CRC32 of the GUID Partition Entry array.\r
78 /// Starts at PartitionEntryLBA and is\r
79 /// computed over a byte length of\r
80 /// NumberOfPartitionEntries * SizeOfPartitionEntry.\r
81 ///\r
959ccb23 82 UINT32 PartitionEntryArrayCRC32;\r
83} EFI_PARTITION_TABLE_HEADER;\r
84\r
8b13229b 85///\r
86/// GPT Partition Entry\r
87///\r
959ccb23 88typedef struct {\r
1bf79370
LG
89 ///\r
90 /// Unique ID that defines the purpose and type of this Partition. A value of\r
91 /// zero defines that this partition entry is not being used.\r
92 ///\r
959ccb23 93 EFI_GUID PartitionTypeGUID;\r
1bf79370
LG
94 ///\r
95 /// GUID that is unique for every partition entry. Every partition ever\r
96 /// created will have a unique GUID.\r
97 /// This GUID must be assigned when the GUID Partition Entry is created.\r
98 ///\r
959ccb23 99 EFI_GUID UniquePartitionGUID;\r
1bf79370
LG
100 ///\r
101 /// Starting LBA of the partition defined by this entry\r
102 ///\r
959ccb23 103 EFI_LBA StartingLBA;\r
1bf79370
LG
104 ///\r
105 /// Ending LBA of the partition defined by this entry.\r
106 ///\r
959ccb23 107 EFI_LBA EndingLBA;\r
1bf79370
LG
108 ///\r
109 /// Attribute bits, all bits reserved by UEFI\r
110 /// Bit 0 Required for the platform to function.\r
111 /// Bits 1-47 Undefined and must be zero.\r
112 /// Bits 48-63 Reserved for GUID specific use.\r
113 ///\r
959ccb23 114 UINT64 Attributes;\r
1bf79370
LG
115 ///\r
116 /// Unicode string.\r
117 ///\r
959ccb23 118 CHAR16 PartitionName[36];\r
119} EFI_PARTITION_ENTRY;\r
120\r
959ccb23 121#pragma pack()\r
122#endif\r
123\r
124\r