199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _EFI_GPT_H
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _EFI_GPT_H
199767f8919635c4928607450d9e0abb932109ceToomas Soome/*++
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCopyright (c) 1998 Intel Corporation
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeModule Name:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome EfiGpt.h
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeAbstract:
199767f8919635c4928607450d9e0abb932109ceToomas Soome Include file for EFI partitioning scheme
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeRevision History
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome--*/
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define PRIMARY_PART_HEADER_LBA 1
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef struct {
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_TABLE_HEADER Header;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA MyLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA AlternateLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA FirstUsableLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA LastUsableLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_GUID DiskGUID;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA PartitionEntryLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT32 NumberOfPartitionEntries;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT32 SizeOfPartitionEntry;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT32 PartitionEntryArrayCRC32;
199767f8919635c4928607450d9e0abb932109ceToomas Soome} EFI_PARTITION_TABLE_HEADER;
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PTAB_HEADER_ID "EFI PART"
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef struct {
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_GUID PartitionTypeGUID;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_GUID UniquePartitionGUID;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA StartingLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome EFI_LBA EndingLBA;
199767f8919635c4928607450d9e0abb932109ceToomas Soome UINT64 Attributes;
199767f8919635c4928607450d9e0abb932109ceToomas Soome CHAR16 PartitionName[36];
199767f8919635c4928607450d9e0abb932109ceToomas Soome} EFI_PARTITION_ENTRY;
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome//
199767f8919635c4928607450d9e0abb932109ceToomas Soome// EFI Partition Attributes
199767f8919635c4928607450d9e0abb932109ceToomas Soome//
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_USED_BY_EFI 0x0000000000000001
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_REQUIRED_TO_FUNCTION 0x0000000000000002
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_USED_BY_OS 0x0000000000000004
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_REQUIRED_BY_OS 0x0000000000000008
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_BACKUP_REQUIRED 0x0000000000000010
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_USER_DATA 0x0000000000000020
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_CRITICAL_USER_DATA 0x0000000000000040
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_REDUNDANT_PARTITION 0x0000000000000080
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_TYPE_UNUSED_GUID \
199767f8919635c4928607450d9e0abb932109ceToomas Soome { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \
199767f8919635c4928607450d9e0abb932109ceToomas Soome { 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} }
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define EFI_PART_TYPE_LEGACY_MBR_GUID \
199767f8919635c4928607450d9e0abb932109ceToomas Soome { 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f} }
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome