Initial import.
[mirror_edk2.git] / EdkModulePkg / Universal / Disk / Partition / Dxe / Gpt.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 Gpt.h
15
16 Abstract:
17
18 Data Structures required for detecting GPT Partitions
19
20 Revision History
21
22 --*/
23
24 #ifndef _GPT_H_
25 #define _GPT_H_
26
27 #pragma pack(1)
28
29 #define PRIMARY_PART_HEADER_LBA 1
30
31 #define EFI_PTAB_HEADER_ID "EFI PART"
32
33 //
34 // EFI Partition Attributes
35 //
36 #define EFI_PART_REQUIRED_TO_FUNCTION 0x0000000000000001
37
38 //
39 // GPT Partition Table Header
40 //
41 typedef struct {
42 EFI_TABLE_HEADER Header;
43 EFI_LBA MyLBA;
44 EFI_LBA AlternateLBA;
45 EFI_LBA FirstUsableLBA;
46 EFI_LBA LastUsableLBA;
47 EFI_GUID DiskGUID;
48 EFI_LBA PartitionEntryLBA;
49 UINT32 NumberOfPartitionEntries;
50 UINT32 SizeOfPartitionEntry;
51 UINT32 PartitionEntryArrayCRC32;
52 } EFI_PARTITION_TABLE_HEADER;
53
54 //
55 // GPT Partition Entry
56 //
57 typedef struct {
58 EFI_GUID PartitionTypeGUID;
59 EFI_GUID UniquePartitionGUID;
60 EFI_LBA StartingLBA;
61 EFI_LBA EndingLBA;
62 UINT64 Attributes;
63 CHAR16 PartitionName[36];
64 } EFI_PARTITION_ENTRY;
65
66 //
67 // GPT Partition Entry Status
68 //
69 typedef struct {
70 BOOLEAN OutOfRange;
71 BOOLEAN Overlap;
72 } EFI_PARTITION_ENTRY_STATUS;
73
74 #pragma pack()
75
76 #endif