From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org 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 17E10211AEA71 for ; Thu, 24 Jan 2019 23:46:46 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 23:46:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,520,1539673200"; d="scan'208";a="313399611" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 24 Jan 2019 23:46:37 -0800 Received: from fmsmsx161.amr.corp.intel.com (10.18.125.9) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 24 Jan 2019 23:46:38 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX161.amr.corp.intel.com (10.18.125.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 24 Jan 2019 23:46:37 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.102]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.190]) with mapi id 14.03.0415.000; Fri, 25 Jan 2019 15:46:35 +0800 From: "Wu, Hao A" To: "Chen, Chen A" , "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Zhang, Chao B" Thread-Topic: [edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition for enable GPT support Thread-Index: AQHUrgjQc7Nmg3VfOE68IO1kJfj376W/WFJwgABDxCCAAAWEUIAAA9gwgAACYyA= Date: Fri, 25 Jan 2019 07:46:34 +0000 Message-ID: References: <20190117020252.7560-1-chen.a.chen@intel.com> <8CCE94730AD68946B3D28B43192D9D2D06E6CF42@shsmsx102.ccr.corp.intel.com> <8CCE94730AD68946B3D28B43192D9D2D06E6CF80@shsmsx102.ccr.corp.intel.com> In-Reply-To: <8CCE94730AD68946B3D28B43192D9D2D06E6CF80@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition for enable GPT support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 07:46:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Chen, Chen A > Sent: Friday, January 25, 2019 3:45 PM > To: Wu, Hao A; Gao, Liming; edk2-devel@lists.01.org > Cc: Kinney, Michael D; Zhang, Chao B > Subject: RE: [edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition for > enable GPT support >=20 >=20 >=20 > -----Original Message----- > From: Wu, Hao A > Sent: Friday, January 25, 2019 3:27 PM > To: Chen, Chen A ; Gao, Liming > ; edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Zhang, Chao B > > Subject: RE: [edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition for > enable GPT support >=20 > > -----Original Message----- > > From: Chen, Chen A > > Sent: Friday, January 25, 2019 3:16 PM > > To: Wu, Hao A; edk2-devel@lists.01.org > > Cc: Kinney, Michael D; Zhang, Chao B; Gao, Liming > > Subject: RE: [edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition > > for enable GPT support > > > > > > > > -----Original Message----- > > From: Wu, Hao A > > Sent: Friday, January 25, 2019 11:04 AM > > To: Chen, Chen A ; edk2-devel@lists.01.org > > Cc: Kinney, Michael D ; Zhang, Chao B > > ; Gao, Liming > > Subject: RE: [edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition > > for enable GPT support > > > > > -----Original Message----- > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf > > > Of Chen A Chen > > > Sent: Thursday, January 17, 2019 10:03 AM > > > To: edk2-devel@lists.01.org > > > Cc: Kinney, Michael D; Zhang, Chao B; Gao, Liming > > > Subject: [edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition for > > > enable GPT support > > > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1470 > > > This two new definitions are defined for GPT in FatPei diver. > > > > > > Cc: Liming Gao > > > Cc: Michael D Kinney > > > Cc: Zhang Chao B > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > Signed-off-by: Chen A Chen > > > --- > > > MdePkg/Include/Uefi/UefiGpt.h | 16 ++++++++++++++++ > > > 1 file changed, 16 insertions(+) > > > > > > diff --git a/MdePkg/Include/Uefi/UefiGpt.h > > > b/MdePkg/Include/Uefi/UefiGpt.h index f635b05390..8665c8cbc9 100644 > > > --- a/MdePkg/Include/Uefi/UefiGpt.h > > > +++ b/MdePkg/Include/Uefi/UefiGpt.h > > > @@ -24,9 +24,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF > > ANY KIND, > > > EITHER EXPRESS OR IMPLIED. > > > /// EFI Partition Table Signature: "EFI PART". > > > /// > > > #define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A= ','R','T') > > > +/// > > > +/// Minimum bytes reserve for EFI entry array buffer. > > > +/// > > > +#define GPT_PART_ENTRY_MIN_SIZE 16384 > > > > May I know where this definition comes from? > > Does it come from the UEFI spec? > > > > Chen: The MACRO is not explicitly defined in UEFI Spec, But UEFI Spec > > specifies a minimum value for GPT entry araray. >=20 > Does it comes from the below content within the UEFI spec? >=20 > > A minimum of 16,384 bytes of space must be reserved for the GPT > > Partition Entry Array. >=20 > If so, I am not sure whether 'EFI_' prefix should be added before > 'GPT_PART_ENTRY_MIN_SIZE'. >=20 > Liming, could you help to confirm? >=20 > Chen: I have no strong opinion on ' GPT_PART_ENTRY_MIN_SIZE' and > 'EFI_GPT_PART_ENTRY_MIN_SIZE'. >=20 > > > > > > > > #pragma pack(1) > > > > > > +/// > > > +/// MBR Partition Entry > > > +/// > > > +typedef struct { > > > + UINT8 BootIndicator; > > > + UINT8 StartingCHS[3]; > > > + UINT8 OSType; > > > + UINT8 EndingCHS[3]; > > > + UINT32 StartingLBA; > > > + UINT32 SizeInLBA; > > > +} MBR_PARTITION_ENTRY; > > > + > > > > What about using the 'MBR_PARTITION_RECORD' definition within > > edk2/MdePkg/Include/IndustryStandard/Mbr.h > > > > and thus get rid of adding this one? > > > > Chen: This structure defined as the following format in Mbr.h > > > > typedef struct { > > .. > > UINT8 StartingLBA[4]; > > UINT8 SizeInLBA[4]; > > } MBR_PARTITION_RECORD; > > > > For StartingLBA, this field is represented the LBA, so I think it > > should be > > UINT32 type not an array type. >=20 > I do not get your point, what prevents you from getting the LBA informati= on > for the byte array? >=20 > Chen: Yes, GPT DXE driver use UNPACK_UINT32 macro to extract UINT32 > from array. But I thought use UINT32 type get the value more directly. I would suggest to use the existing definition and avoid adding a 'duplicated' definition. Best Regards, Hao Wu >=20 > Best Regards, > Hao Wu >=20 > > > > The same meaning is also for SizeInLba. > > > > Best Regards, > > Hao Wu > > > > > /// > > > /// GPT Partition Table Header. > > > /// > > > -- > > > 2.16.2.windows.1 > > > > > > _______________________________________________ > > > edk2-devel mailing list > > > edk2-devel@lists.01.org > > > https://lists.01.org/mailman/listinfo/edk2-devel