1/*	$NetBSD$	*/
2
3#ifndef _EFI_GPT_H
4#define _EFI_GPT_H
5/*++
6
7Copyright (c) 1998  Intel Corporation
8
9Module Name:
10
11    EfiGpt.h
12
13Abstract:
14    Include file for EFI partitioning scheme
15
16
17
18Revision History
19
20--*/
21
22#define PRIMARY_PART_HEADER_LBA         1
23
24typedef struct {
25    EFI_TABLE_HEADER    Header;
26    EFI_LBA             MyLBA;
27    EFI_LBA             AlternateLBA;
28    EFI_LBA             FirstUsableLBA;
29    EFI_LBA             LastUsableLBA;
30    EFI_GUID            DiskGUID;
31    EFI_LBA             PartitionEntryLBA;
32    UINT32              NumberOfPartitionEntries;
33    UINT32              SizeOfPartitionEntry;
34    UINT32              PartitionEntryArrayCRC32;
35} EFI_PARTITION_TABLE_HEADER;
36
37#define EFI_PTAB_HEADER_ID  "EFI PART"
38
39typedef struct {
40    EFI_GUID    PartitionTypeGUID;
41    EFI_GUID    UniquePartitionGUID;
42    EFI_LBA     StartingLBA;
43    EFI_LBA     EndingLBA;
44    UINT64      Attributes;
45    CHAR16      PartitionName[36];
46} EFI_PARTITION_ENTRY;
47
48//
49// EFI Partition Attributes
50//
51#define EFI_PART_USED_BY_EFI            0x0000000000000001
52#define EFI_PART_REQUIRED_TO_FUNCTION   0x0000000000000002
53#define EFI_PART_USED_BY_OS             0x0000000000000004
54#define EFI_PART_REQUIRED_BY_OS         0x0000000000000008
55#define EFI_PART_BACKUP_REQUIRED        0x0000000000000010
56#define EFI_PART_USER_DATA              0x0000000000000020
57#define EFI_PART_CRITICAL_USER_DATA     0x0000000000000040
58#define EFI_PART_REDUNDANT_PARTITION    0x0000000000000080
59
60#define EFI_PART_TYPE_UNUSED_GUID   \
61    { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }
62
63#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID  \
64    { 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} }
65
66#define EFI_PART_TYPE_LEGACY_MBR_GUID   \
67    { 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f} }
68
69#endif
70
71