From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9225F81C61 for ; Thu, 1 Dec 2016 00:38:48 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 01 Dec 2016 00:38:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,723,1477983600"; d="scan'208";a="792956373" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 01 Dec 2016 00:38:48 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 1 Dec 2016 00:38:47 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 1 Dec 2016 00:38:47 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Thu, 1 Dec 2016 16:38:46 +0800 From: "Gao, Liming" To: "Yao, Jiewen" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [Patch] MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices Thread-Index: AQHSS6ZOdyg6dQZ1Q0edpFUlCG81xKDyxOZw Date: Thu, 1 Dec 2016 08:38:46 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4BBD4E@shsmsx102.ccr.corp.intel.com> References: <1480574828-21908-1-git-send-email-liming.gao@intel.com> <74D8A39837DF1E4DA445A8C0B3885C50386DEB3E@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C50386DEB3E@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 08:38:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Got it. I will keep comment "Need add Free memory at first, to let gSmmMemo= ryMap record data". -----Original Message----- From: Yao, Jiewen=20 Sent: Thursday, December 01, 2016 3:41 PM To: Gao, Liming ; edk2-devel@lists.01.org Cc: Zeng, Star Subject: RE: [Patch] MdeModulePkg PiSmmCore: Update comments in InitializeM= emoryServices HI Liming How about we keep original comment? Your new comment describes *what* the coding is doing, and original comment= describes *why*. If you agree, reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Gao, Liming > Sent: Thursday, December 1, 2016 2:47 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen=20 > > Subject: [Patch] MdeModulePkg PiSmmCore: Update comments in=20 > InitializeMemoryServices >=20 > Add the comments to describe Free and Allocated SMRAM are added=20 > separately. >=20 > Cc: Star Zeng > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Liming Gao > --- > MdeModulePkg/Core/PiSmmCore/Pool.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > 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 =3D=20 > 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 =3D 0; Index < SmramRangeCount; Index++) { > if ((SmramRanges[Index].RegionState & (EFI_ALLOCATED |=20 > EFI_NEEDS_TESTING | EFI_NEEDS_ECC_INITIALIZATION)) !=3D 0) { @@ -100,6=20 > +99,9 @@ SmmInitializeMemoryServices ( > ); > } >=20 > + // > + // Add the allocated SMRAM regions > + // > for (Index =3D 0; Index < SmramRangeCount; Index++) { > if ((SmramRanges[Index].RegionState & (EFI_ALLOCATED |=20 > EFI_NEEDS_TESTING | EFI_NEEDS_ECC_INITIALIZATION)) =3D=3D 0) { > continue; > -- > 2.8.0.windows.1