From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6295D21C9E7D9 for ; Thu, 6 Jul 2017 22:52:45 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 06 Jul 2017 22:54:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,320,1496127600"; d="scan'208";a="284002987" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 06 Jul 2017 22:54:26 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 6 Jul 2017 22:54:26 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 6 Jul 2017 22:54:25 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.151]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Fri, 7 Jul 2017 13:54:24 +0800 From: "Ni, Ruiyu" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" , "Kinney, Michael D" , "Gao, Liming" Thread-Topic: [edk2] [PATCH v2 1/2] MdePkg: Add EFI Partition Information Protocol definitions Thread-Index: AQHS9uN+aYH0/iAGmUmC+vcSQ7i596JH3M5w Date: Fri, 7 Jul 2017 05:54:23 +0000 Deferred-Delivery: Fri, 7 Jul 2017 05:54:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B9B1CB3@SHSMSX104.ccr.corp.intel.com> References: <20170707053944.10500-1-hao.a.wu@intel.com> <20170707053944.10500-2-hao.a.wu@intel.com> In-Reply-To: <20170707053944.10500-2-hao.a.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 1/2] MdePkg: Add EFI Partition Information Protocol definitions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 05:52:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Hao Wu > Sent: Friday, July 7, 2017 1:40 PM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Ni, Ruiyu ; > Kinney, Michael D ; Gao, Liming > > Subject: [edk2] [PATCH v2 1/2] MdePkg: Add EFI Partition Information > Protocol definitions >=20 > Cc: Ruiyu Ni > Cc: Michael D Kinney > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Hao Wu > --- > MdePkg/Include/Protocol/PartitionInfo.h | 74 ++++++++++++++++++++ > MdePkg/MdePkg.dec | 3 + > 2 files changed, 77 insertions(+) >=20 > diff --git a/MdePkg/Include/Protocol/PartitionInfo.h > b/MdePkg/Include/Protocol/PartitionInfo.h > new file mode 100644 > index 0000000000..005b1cf18a > --- /dev/null > +++ b/MdePkg/Include/Protocol/PartitionInfo.h > @@ -0,0 +1,74 @@ > +/** @file > + This file defines the EFI Partition Information Protocol. > + > + Copyright (c) 2017, Intel Corporation. All rights reserved.
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 > +#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 > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index > 7a7504b7a3..c48f248526 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -1671,6 +1671,9 @@ > ## Include/Protocol/BluetoothLeConfig.h > gEfiBluetoothLeConfigProtocolGuid =3D { 0x8f76da58, 0x1f99, 0x= 4275, > { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 } } >=20 > + ## Include/Protocol/PartitionInfo.h > + gEfiPartitionInfoProtocolGuid =3D { 0x8cf2f62c, 0xbc9b, 0x= 4821, { 0x80, > 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }} > + > # > # Protocols defined in Shell2.0 > # > -- > 2.12.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel