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