From 6d27778973edf6bdebfa812eac8893d52961a891 Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 9 Jun 2020 17:56:53 -0700 Subject: vendorcode/intel: Add edk2-stable202005 support This patch includes (edk2/edk2-stable202005) all required headers for edk2-stable202005 quarterly EDK2 tag from EDK2 github project using below command: >> git clone https://github.com/tianocore/edk2.git vedk2-stable202005 Only include necessary header files. MdePkg/Include/Base.h was updated to avoid compilation errors through safeguarding definitions for MIN, MAX, NULL, ABS, ARRAY_SIZE. Signed-off-by: Jonathan Zhang Change-Id: I3172505d9b829647ee1208c87623172f10b39310 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42239 Reviewed-by: Angel Pons Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- .../MdePkg/Include/Protocol/PartitionInfo.h | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Protocol/PartitionInfo.h (limited to 'src/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Protocol/PartitionInfo.h') diff --git a/src/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Protocol/PartitionInfo.h b/src/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Protocol/PartitionInfo.h new file mode 100644 index 0000000000..cabf140eb3 --- /dev/null +++ b/src/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Protocol/PartitionInfo.h @@ -0,0 +1,68 @@ +/** @file + This file defines the EFI Partition Information Protocol. + + Copyright (c) 2017, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + This Protocol is introduced in UEFI Specification 2.7 + +**/ + +#ifndef __PARTITION_INFO_PROTOCOL_H__ +#define __PARTITION_INFO_PROTOCOL_H__ + +#include +#include + +// +// 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 -- cgit v1.2.3