summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2015-07-28 02:07:06 +0000
committerlzeng14 <lzeng14@Edk2>2015-07-28 02:07:06 +0000
commit08308fc9eba9d0bc0d3a923df90a86b8521028d5 (patch)
tree2c809d0bfec31da7792dfdf7e9284db10257bf25 /MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
parentb110527f6fd3f2439ce35a85945be5647d3e6137 (diff)
downloadedk2-08308fc9eba9d0bc0d3a923df90a86b8521028d5.tar.gz
edk2-08308fc9eba9d0bc0d3a923df90a86b8521028d5.tar.bz2
edk2-08308fc9eba9d0bc0d3a923df90a86b8521028d5.zip
MdeModulePkg PiSmmIpl: Use AllocateZeroPool() for FullSmramRanges
to instead of AllocatePool() to ensure the data is clean for the following consumption. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18087 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
index 9b269779ea..c534ee3701 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
@@ -1293,7 +1293,7 @@ GetFullSmramRanges (
//
*FullSmramRangeCount = SmramRangeCount + 1;
Size = (*FullSmramRangeCount) * sizeof (EFI_SMRAM_DESCRIPTOR);
- FullSmramRanges = (EFI_SMRAM_DESCRIPTOR *) AllocatePool (Size);
+ FullSmramRanges = (EFI_SMRAM_DESCRIPTOR *) AllocateZeroPool (Size);
ASSERT (FullSmramRanges != NULL);
Status = mSmmAccess->GetCapabilities (mSmmAccess, &Size, FullSmramRanges);
@@ -1406,7 +1406,7 @@ GetFullSmramRanges (
// Sort the entries,
// and reserve one entry for SMM Core in the full SMRAM ranges.
//
- FullSmramRanges = AllocatePool ((TempSmramRangeCount + 1) * sizeof (EFI_SMRAM_DESCRIPTOR));
+ FullSmramRanges = AllocateZeroPool ((TempSmramRangeCount + 1) * sizeof (EFI_SMRAM_DESCRIPTOR));
ASSERT (FullSmramRanges != NULL);
*FullSmramRangeCount = 0;
do {