]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Uefi/UefiGpt.h
Move to directory "Include"
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiGpt.h
1 /* @file
2 EFI Guid Partition Table Format Definition.
3
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
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.
12
13 Module Name: UefiGpt.h
14
15 **/
16
17 #ifndef __UEFI_GPT_H__
18 #define __UEFI_GPT_H__
19
20 #define PRIMARY_PART_HEADER_LBA 1
21
22 //
23 // EFI Partition Table Signature: "EFI PART"
24 //
25 #define EFI_PTAB_HEADER_ID 0x5452415020494645ULL
26
27 #pragma pack(1)
28 //
29 // GPT Partition Table Header
30 //
31 typedef struct {
32 EFI_TABLE_HEADER Header;
33 EFI_LBA MyLBA;
34 EFI_LBA AlternateLBA;
35 EFI_LBA FirstUsableLBA;
36 EFI_LBA LastUsableLBA;
37 EFI_GUID DiskGUID;
38 EFI_LBA PartitionEntryLBA;
39 UINT32 NumberOfPartitionEntries;
40 UINT32 SizeOfPartitionEntry;
41 UINT32 PartitionEntryArrayCRC32;
42 } EFI_PARTITION_TABLE_HEADER;
43
44 //
45 // GPT Partition Entry
46 //
47 typedef struct {
48 EFI_GUID PartitionTypeGUID;
49 EFI_GUID UniquePartitionGUID;
50 EFI_LBA StartingLBA;
51 EFI_LBA EndingLBA;
52 UINT64 Attributes;
53 CHAR16 PartitionName[36];
54 } EFI_PARTITION_ENTRY;
55
56 //
57 // GPT Partition Entry Status
58 //
59 typedef struct {
60 BOOLEAN OutOfRange;
61 BOOLEAN Overlap;
62 } EFI_PARTITION_ENTRY_STATUS;
63
64 #pragma pack()
65 #endif
66
67