]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/PartitionInfo.h
MdePkg/Include/Protocol/Tls.h: pack structures from the TLS RFC
[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
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 @par Revision Reference:\r
14 This Protocol is introduced in UEFI Specification 2.7\r
15\r
16**/\r
17\r
18#ifndef __PARTITION_INFO_PROTOCOL_H__\r
19#define __PARTITION_INFO_PROTOCOL_H__\r
20\r
21#include <IndustryStandard/Mbr.h>\r
22#include <Uefi/UefiGpt.h>\r
23\r
24//\r
25// EFI Partition Information Protocol GUID value\r
26//\r
27#define EFI_PARTITION_INFO_PROTOCOL_GUID \\r
28 { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }};\r
29\r
30\r
31#define EFI_PARTITION_INFO_PROTOCOL_REVISION 0x0001000\r
32#define PARTITION_TYPE_OTHER 0x00\r
33#define PARTITION_TYPE_MBR 0x01\r
34#define PARTITION_TYPE_GPT 0x02\r
35\r
36#pragma pack(1)\r
37\r
38///\r
39/// Partition Information Protocol structure.\r
40///\r
41typedef struct {\r
42 //\r
43 // Set to EFI_PARTITION_INFO_PROTOCOL_REVISION.\r
44 //\r
45 UINT32 Revision;\r
46 //\r
47 // Partition info type (PARTITION_TYPE_MBR, PARTITION_TYPE_GPT, or PARTITION_TYPE_OTHER).\r
48 //\r
49 UINT32 Type;\r
50 //\r
51 // If 1, partition describes an EFI System Partition.\r
52 //\r
53 UINT8 System;\r
54 UINT8 Reserved[7];\r
55 union {\r
56 ///\r
57 /// MBR data\r
58 ///\r
59 MBR_PARTITION_RECORD Mbr;\r
60 ///\r
61 /// GPT data\r
62 ///\r
63 EFI_PARTITION_ENTRY Gpt;\r
64 } Info;\r
65} EFI_PARTITION_INFO_PROTOCOL;\r
66\r
67#pragma pack()\r
68\r
69///\r
70/// Partition Information Protocol GUID variable.\r
71///\r
72extern EFI_GUID gEfiPartitionInfoProtocolGuid;\r
73\r
74#endif\r