aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/PartitionInfo.h
blob: 9e67748121ede386ad735fdcc1e642bdda058480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/** @file
  This file defines the EFI Partition Information Protocol.

  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD License
  which accompanies this distribution.  The full text of the license may be found at
  http://opensource.org/licenses/bsd-license.php

  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

  @par Revision Reference:
  This Protocol is introduced in UEFI Specification 2.7

**/

#ifndef __PARTITION_INFO_PROTOCOL_H__
#define __PARTITION_INFO_PROTOCOL_H__

#include <IndustryStandard/Mbr.h>
#include <Uefi/UefiGpt.h>

//
// EFI Partition Information Protocol GUID value
//
#define EFI_PARTITION_INFO_PROTOCOL_GUID \
  { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }};


#define EFI_PARTITION_INFO_PROTOCOL_REVISION     0x0001000
#define PARTITION_TYPE_OTHER                     0x00
#define PARTITION_TYPE_MBR                       0x01
#define PARTITION_TYPE_GPT                       0x02

#pragma pack(1)

///
/// Partition Information Protocol structure.
///
typedef struct {
  //
  // Set to EFI_PARTITION_INFO_PROTOCOL_REVISION.
  //
  UINT32                     Revision;
  //
  // Partition info type (PARTITION_TYPE_MBR, PARTITION_TYPE_GPT, or PARTITION_TYPE_OTHER).
  //
  UINT32                     Type;
  //
  // If 1, partition describes an EFI System Partition.
  //
  UINT8                      System;
  UINT8                      Reserved[7];
  union {
    ///
    /// MBR data
    ///
    MBR_PARTITION_RECORD     Mbr;
    ///
    /// GPT data
    ///
    EFI_PARTITION_ENTRY      Gpt;
  } Info;
} EFI_PARTITION_INFO_PROTOCOL;

#pragma pack()

///
/// Partition Information Protocol GUID variable.
///
extern EFI_GUID gEfiPartitionInfoProtocolGuid;

#endif