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=michael.d.kinney@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 E2EBE2244E3FC for ; Mon, 23 Apr 2018 08:25:53 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2018 08:25:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,318,1520924400"; d="scan'208";a="33995336" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga007.fm.intel.com with ESMTP; 23 Apr 2018 08:25:52 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.55]) by ORSMSX110.amr.corp.intel.com ([169.254.10.11]) with mapi id 14.03.0319.002; Mon, 23 Apr 2018 08:25:51 -0700 From: "Kinney, Michael D" To: "Zeng, Star" , "edk2-devel@lists.01.org" , "Kinney, Michael D" CC: "Yao, Jiewen" , Sean Brogan Thread-Topic: [PATCH] MdeModulePkg EsrtFmpDxe: Use EfiBootServicesData for ESRT table Thread-Index: AQHT2tGDe+Yzgm7iGEqLKQLK/q8Y9KQOePOA Date: Mon, 23 Apr 2018 15:25:51 +0000 Message-ID: References: <1524467142-25868-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1524467142-25868-1-git-send-email-star.zeng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg EsrtFmpDxe: Use EfiBootServicesData for ESRT table X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2018 15:25:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael D Kinney Mike > -----Original Message----- > From: Zeng, Star > Sent: Monday, April 23, 2018 12:06 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen > ; Kinney, Michael D > ; Sean Brogan > > Subject: [PATCH] MdeModulePkg EsrtFmpDxe: Use > EfiBootServicesData for ESRT table >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D933 >=20 > We see UEFI spec is saying to use EfiBootServicesData > for ESRT table. >=20 > UEFI 2.7 chapter 23.3: > The ESRT shall be stored in memory of type > EfiBootServicesData. >=20 > And we see EsrtDxe is using AllocatePool for ESRT table, > but > EsrtFmpDxe is using AllocateRuntimeZeroPool for ESRT > table. >=20 > This patch updates code to use EfiBootServicesData for > ESRT table > in EsrtFmpDxe. >=20 > Cc: Jiewen Yao > Cc: Michael D Kinney > Cc: Sean Brogan > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c > b/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c > index 3da4a62fb1c4..cc9dd63b53cd 100644 > --- a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c > +++ b/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c > @@ -190,7 +190,7 @@ CreateEsrtEntry ( > } >=20 > NewSize =3D ((mTable->FwResourceCountMax + > GROWTH_STEP) * sizeof (EFI_SYSTEM_RESOURCE_ENTRY)) + > sizeof (EFI_SYSTEM_RESOURCE_TABLE); > - NewTable =3D AllocateRuntimeZeroPool (NewSize); > + NewTable =3D AllocateZeroPool (NewSize); > if (NewTable =3D=3D NULL) { > DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to > allocate memory larger table for ESRT. \n")); > return EFI_OUT_OF_RESOURCES; > @@ -439,7 +439,7 @@ EsrtFmpEntryPoint ( > // > // Allocate Memory for table > // > - mTable =3D AllocateRuntimeZeroPool ( > + mTable =3D AllocateZeroPool ( > (GROWTH_STEP * sizeof > (EFI_SYSTEM_RESOURCE_ENTRY)) + sizeof > (EFI_SYSTEM_RESOURCE_TABLE) > ); > ASSERT (mTable !=3D NULL); > -- > 2.7.0.windows.1