]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Uefi/UefiGpt.h
1. Fix incorrect definition of UEFI_CONFIG_LANG and UEFI_CONFIG_LANG_2. They should...
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiGpt.h
... / ...
CommitLineData
1/** @file\r
2 EFI Guid Partition Table Format Definition.\r
3\r
4 Copyright (c) 2006 - 2008, Intel Corporation\r
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
13**/\r
14\r
15#ifndef __UEFI_GPT_H__\r
16#define __UEFI_GPT_H__\r
17\r
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
22#define PRIMARY_PART_HEADER_LBA 1\r
23///\r
24/// EFI Partition Table Signature: "EFI PART"\r
25/// \r
26#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T')\r
27\r
28#pragma pack(1)\r
29\r
30///\r
31/// GPT Partition Table Header\r
32///\r
33typedef struct {\r
34 ///\r
35 /// The table header for the GPT partition Table.\r
36 /// This header contains EFI_PTAB_HEADER_ID\r
37 ///\r
38 EFI_TABLE_HEADER Header;\r
39 ///\r
40 /// The LBA that contains this data structure.\r
41 ///\r
42 EFI_LBA MyLBA;\r
43 ///\r
44 /// LBA address of the alternate GUID Partition Table Header.\r
45 ///\r
46 EFI_LBA AlternateLBA;\r
47 ///\r
48 /// The first usable logical block that may be used\r
49 /// by a partition described by a GUID Partition Entry.\r
50 ///\r
51 EFI_LBA FirstUsableLBA;\r
52 ///\r
53 /// The last usable logical block that may be used\r
54 /// by a partition described by a GUID Partition Entry.\r
55 ///\r
56 EFI_LBA LastUsableLBA;\r
57 ///\r
58 /// GUID that can be used to uniquely identify the disk.\r
59 ///\r
60 EFI_GUID DiskGUID;\r
61 ///\r
62 /// The starting LBA of the GUID Partition Entry array.\r
63 ///\r
64 EFI_LBA PartitionEntryLBA;\r
65 ///\r
66 /// The number of Partition Entries in the GUID Partition Entry array.\r
67 ///\r
68 UINT32 NumberOfPartitionEntries;\r
69 ///\r
70 /// The size, in bytes, of each the GUID Partition\r
71 /// Entry structures in the GUID Partition Entry\r
72 /// array. Must be a multiple of 8.\r
73 ///\r
74 UINT32 SizeOfPartitionEntry;\r
75 ///\r
76 /// The CRC32 of the GUID Partition Entry array.\r
77 /// Starts at PartitionEntryLBA and is\r
78 /// computed over a byte length of\r
79 /// NumberOfPartitionEntries * SizeOfPartitionEntry.\r
80 ///\r
81 UINT32 PartitionEntryArrayCRC32;\r
82} EFI_PARTITION_TABLE_HEADER;\r
83\r
84///\r
85/// GPT Partition Entry\r
86///\r
87typedef struct {\r
88 ///\r
89 /// Unique ID that defines the purpose and type of this Partition. A value of\r
90 /// zero defines that this partition entry is not being used.\r
91 ///\r
92 EFI_GUID PartitionTypeGUID;\r
93 ///\r
94 /// GUID that is unique for every partition entry. Every partition ever\r
95 /// created will have a unique GUID.\r
96 /// This GUID must be assigned when the GUID Partition Entry is created.\r
97 ///\r
98 EFI_GUID UniquePartitionGUID;\r
99 ///\r
100 /// Starting LBA of the partition defined by this entry\r
101 ///\r
102 EFI_LBA StartingLBA;\r
103 ///\r
104 /// Ending LBA of the partition defined by this entry.\r
105 ///\r
106 EFI_LBA EndingLBA;\r
107 ///\r
108 /// Attribute bits, all bits reserved by UEFI\r
109 /// Bit 0 Required for the platform to function.\r
110 /// Bits 1-47 Undefined and must be zero.\r
111 /// Bits 48-63 Reserved for GUID specific use.\r
112 ///\r
113 UINT64 Attributes;\r
114 ///\r
115 /// Unicode string.\r
116 ///\r
117 CHAR16 PartitionName[36];\r
118} EFI_PARTITION_ENTRY;\r
119\r
120#pragma pack()\r
121#endif\r
122\r
123\r