Reviewed-by: [email protected] > -----Original Message----- > From: Zeng, Star > Sent: Monday, April 23, 2018 3:06 PM > To: [email protected] > Cc: Zeng, Star <[email protected]>; Yao, Jiewen <[email protected]>; > Kinney, Michael D <[email protected]>; Sean Brogan > <[email protected]> > Subject: [PATCH] MdeModulePkg EsrtFmpDxe: Use EfiBootServicesData for ESRT > table > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=933 > > We see UEFI spec is saying to use EfiBootServicesData for ESRT table. > > UEFI 2.7 chapter 23.3: > The ESRT shall be stored in memory of type EfiBootServicesData. > > And we see EsrtDxe is using AllocatePool for ESRT table, but > EsrtFmpDxe is using AllocateRuntimeZeroPool for ESRT table. > > This patch updates code to use EfiBootServicesData for ESRT table > in EsrtFmpDxe. > > Cc: Jiewen Yao <[email protected]> > Cc: Michael D Kinney <[email protected]> > Cc: Sean Brogan <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng <[email protected]> > --- > MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > 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 ( > } > > NewSize = ((mTable->FwResourceCountMax + GROWTH_STEP) * sizeof > (EFI_SYSTEM_RESOURCE_ENTRY)) + sizeof (EFI_SYSTEM_RESOURCE_TABLE); > - NewTable = AllocateRuntimeZeroPool (NewSize); > + NewTable = AllocateZeroPool (NewSize); > if (NewTable == 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 = AllocateRuntimeZeroPool ( > + mTable = AllocateZeroPool ( > (GROWTH_STEP * sizeof (EFI_SYSTEM_RESOURCE_ENTRY)) + > sizeof (EFI_SYSTEM_RESOURCE_TABLE) > ); > ASSERT (mTable != NULL); > -- > 2.7.0.windows.1
_______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

