diff options
author | Star Zeng <star.zeng@intel.com> | 2018-04-20 15:13:32 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-04-25 15:50:55 +0800 |
commit | 3545488dd64c4bf9e7549d020112342985931ab1 (patch) | |
tree | ba267cdf56997f9fc346328fc3d6f0f45a80941b /MdeModulePkg | |
parent | 3e5c6c07b151478c4944e46a5fdfac14e117e4f1 (diff) | |
download | edk2-3545488dd64c4bf9e7549d020112342985931ab1.zip edk2-3545488dd64c4bf9e7549d020112342985931ab1.tar.gz edk2-3545488dd64c4bf9e7549d020112342985931ab1.tar.bz2 |
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.
Change-Id: I72a73e0cc0a37e429cc262d68eb284fb268cb5ef
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c b/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c index 3da4a62..cc9dd63 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);
|