diff options
author | Star Zeng <star.zeng@intel.com> | 2015-07-28 02:07:06 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2015-07-28 02:07:06 +0000 |
commit | 08308fc9eba9d0bc0d3a923df90a86b8521028d5 (patch) | |
tree | 2c809d0bfec31da7792dfdf7e9284db10257bf25 /MdeModulePkg/Core | |
parent | b110527f6fd3f2439ce35a85945be5647d3e6137 (diff) | |
download | edk2-platforms-08308fc9eba9d0bc0d3a923df90a86b8521028d5.tar.xz |
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')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 4 |
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 {
|