]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Uefi/UefiGpt.h
Import Pal.h and Sal.h.
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiGpt.h
CommitLineData
959ccb23 1/* @file\r
2 EFI Guid Partition Table Format Definition.\r
3\r
4 Copyright (c) 2006 - 2007, 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 Module Name: UefiGpt.h\r
14\r
15**/\r
16\r
17#ifndef __UEFI_GPT_H__\r
18#define __UEFI_GPT_H__\r
19\r
20#define PRIMARY_PART_HEADER_LBA 1\r
21\r
22//\r
23// EFI Partition Table Signature: "EFI PART"\r
24// \r
25#define EFI_PTAB_HEADER_ID 0x5452415020494645ULL\r
26\r
27#pragma pack(1)\r
28//\r
29// GPT Partition Table Header\r
30//\r
31typedef struct {\r
32 EFI_TABLE_HEADER Header;\r
33 EFI_LBA MyLBA;\r
34 EFI_LBA AlternateLBA;\r
35 EFI_LBA FirstUsableLBA;\r
36 EFI_LBA LastUsableLBA;\r
37 EFI_GUID DiskGUID;\r
38 EFI_LBA PartitionEntryLBA;\r
39 UINT32 NumberOfPartitionEntries;\r
40 UINT32 SizeOfPartitionEntry;\r
41 UINT32 PartitionEntryArrayCRC32;\r
42} EFI_PARTITION_TABLE_HEADER;\r
43\r
44//\r
45// GPT Partition Entry\r
46//\r
47typedef struct {\r
48 EFI_GUID PartitionTypeGUID;\r
49 EFI_GUID UniquePartitionGUID;\r
50 EFI_LBA StartingLBA;\r
51 EFI_LBA EndingLBA;\r
52 UINT64 Attributes;\r
53 CHAR16 PartitionName[36];\r
54} EFI_PARTITION_ENTRY;\r
55\r
56//\r
57// GPT Partition Entry Status\r
58//\r
59typedef struct {\r
60 BOOLEAN OutOfRange;\r
61 BOOLEAN Overlap;\r
62} EFI_PARTITION_ENTRY_STATUS;\r
63\r
64#pragma pack()\r
65#endif\r
66\r
67\r