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
This commit is contained in:
Star Zeng 2015-07-28 02:07:06 +00:00 committed by lzeng14
parent b110527f6f
commit 08308fc9eb
1 changed files with 2 additions and 2 deletions

View File

@ -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 {