]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/PartitionInfo.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / PartitionInfo.h
CommitLineData
bce72b58
HW
1/** @file\r
2 This file defines the EFI Partition Information Protocol.\r
3\r
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
bce72b58
HW
6\r
7 @par Revision Reference:\r
8 This Protocol is introduced in UEFI Specification 2.7\r
9\r
10**/\r
11\r
12#ifndef __PARTITION_INFO_PROTOCOL_H__\r
13#define __PARTITION_INFO_PROTOCOL_H__\r
14\r
15#include <IndustryStandard/Mbr.h>\r
16#include <Uefi/UefiGpt.h>\r
17\r
18//\r
19// EFI Partition Information Protocol GUID value\r
20//\r
21#define EFI_PARTITION_INFO_PROTOCOL_GUID \\r
22 { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }};\r
23\r
24\r
25#define EFI_PARTITION_INFO_PROTOCOL_REVISION 0x0001000\r
26#define PARTITION_TYPE_OTHER 0x00\r
27#define PARTITION_TYPE_MBR 0x01\r
28#define PARTITION_TYPE_GPT 0x02\r
29\r
30#pragma pack(1)\r
31\r
32///\r
33/// Partition Information Protocol structure.\r
34///\r
35typedef struct {\r
36 //\r
37 // Set to EFI_PARTITION_INFO_PROTOCOL_REVISION.\r
38 //\r
39 UINT32 Revision;\r
40 //\r
41 // Partition info type (PARTITION_TYPE_MBR, PARTITION_TYPE_GPT, or PARTITION_TYPE_OTHER).\r
42 //\r
43 UINT32 Type;\r
44 //\r
45 // If 1, partition describes an EFI System Partition.\r
46 //\r
47 UINT8 System;\r
48 UINT8 Reserved[7];\r
49 union {\r
50 ///\r
51 /// MBR data\r
52 ///\r
53 MBR_PARTITION_RECORD Mbr;\r
54 ///\r
55 /// GPT data\r
56 ///\r
57 EFI_PARTITION_ENTRY Gpt;\r
58 } Info;\r
59} EFI_PARTITION_INFO_PROTOCOL;\r
60\r
61#pragma pack()\r
62\r
63///\r
64/// Partition Information Protocol GUID variable.\r
65///\r
66extern EFI_GUID gEfiPartitionInfoProtocolGuid;\r
67\r
68#endif\r