public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Liming Gao <liming.gao@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Jiewen Yao <jiewen.yao@intel.com>
Subject: [Patch] MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices
Date: Thu,  1 Dec 2016 14:47:08 +0800	[thread overview]
Message-ID: <1480574828-21908-1-git-send-email-liming.gao@intel.com> (raw)

Add the comments to describe Free and Allocated SMRAM are added separately.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdeModulePkg/Core/PiSmmCore/Pool.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCore/Pool.c
index dcfd13e..b638aad 100644
--- a/MdeModulePkg/Core/PiSmmCore/Pool.c
+++ b/MdeModulePkg/Core/PiSmmCore/Pool.c
@@ -85,8 +85,7 @@ SmmInitializeMemoryServices (
     SmramRanges[CurrentSmramRangesIndex].PhysicalSize = SmramRanges[CurrentSmramRangesIndex].PhysicalSize - SmmCodeSize;
   }
   //
-  // Initialize free SMRAM regions
-  // Need add Free memory at first, to let gSmmMemoryMap record data
+  // Add Free SMRAM regions
   //
   for (Index = 0; Index < SmramRangeCount; Index++) {
     if ((SmramRanges[Index].RegionState & (EFI_ALLOCATED | EFI_NEEDS_TESTING | EFI_NEEDS_ECC_INITIALIZATION)) != 0) {
@@ -100,6 +99,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;
-- 
2.8.0.windows.1



             reply	other threads:[~2016-12-01  6:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  6:47 Liming Gao [this message]
2016-12-01  7:41 ` [Patch] MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices Yao, Jiewen
2016-12-01  8:38   ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480574828-21908-1-git-send-email-liming.gao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox