INF module description added
[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
35 EFI_TABLE_HEADER Header;\r
36 EFI_LBA MyLBA;\r
37 EFI_LBA AlternateLBA;\r
38 EFI_LBA FirstUsableLBA;\r
39 EFI_LBA LastUsableLBA;\r
40 EFI_GUID DiskGUID;\r
41 EFI_LBA PartitionEntryLBA;\r
42 UINT32 NumberOfPartitionEntries;\r
43 UINT32 SizeOfPartitionEntry;\r
44 UINT32 PartitionEntryArrayCRC32;\r
45} EFI_PARTITION_TABLE_HEADER;\r
46\r
8b13229b 47///\r
48/// GPT Partition Entry\r
49///\r
959ccb23 50typedef struct {\r
51 EFI_GUID PartitionTypeGUID;\r
52 EFI_GUID UniquePartitionGUID;\r
53 EFI_LBA StartingLBA;\r
54 EFI_LBA EndingLBA;\r
55 UINT64 Attributes;\r
56 CHAR16 PartitionName[36];\r
57} EFI_PARTITION_ENTRY;\r
58\r
959ccb23 59#pragma pack()\r
60#endif\r
61\r
62\r