From: Liming Gao Date: Thu, 1 Dec 2016 06:30:18 +0000 (+0800) Subject: MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices X-Git-Tag: edk2-stable201903~5010 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=bb34cc8c389a6c301b70984879eaa846fb12c9fe MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices Add the comments to describe Free and Allocated SMRAM are added separately. Cc: Star Zeng Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Jiewen Yao --- diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCore/Pool.c index dcfd13e575..aae6a6e217 100644 --- a/MdeModulePkg/Core/PiSmmCore/Pool.c +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c @@ -85,7 +85,7 @@ SmmInitializeMemoryServices ( SmramRanges[CurrentSmramRangesIndex].PhysicalSize = SmramRanges[CurrentSmramRangesIndex].PhysicalSize - SmmCodeSize; } // - // Initialize free SMRAM regions + // Add Free SMRAM regions // Need add Free memory at first, to let gSmmMemoryMap record data // for (Index = 0; Index < SmramRangeCount; Index++) { @@ -100,6 +100,9 @@ SmmInitializeMemoryServices ( ); } + // + // Add the allocated SMRAM regions + // for (Index = 0; Index < SmramRangeCount; Index++) { if ((SmramRanges[Index].RegionState & (EFI_ALLOCATED | EFI_NEEDS_TESTING | EFI_NEEDS_ECC_INITIALIZATION)) == 0) { continue;