From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 9679821138A9E for ; Sun, 16 Sep 2018 19:59:46 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2018 19:59:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,383,1531810800"; d="scan'208";a="70517892" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 16 Sep 2018 19:55:43 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 16 Sep 2018 19:55:43 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 16 Sep 2018 19:55:42 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.226]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.240]) with mapi id 14.03.0319.002; Mon, 17 Sep 2018 10:55:40 +0800 From: "Zeng, Star" To: "Wang, Jian J" , "edk2-devel@lists.01.org" CC: "You, Benjamin" , "Dong, Eric" , Laszlo Ersek , "Zeng, Star" Thread-Topic: [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into else block Thread-Index: AQHUS/pGXuc3ZwZ7Lk+1W6+N4KviPaTzy9rw Date: Mon, 17 Sep 2018 02:55:39 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBBA685@shsmsx102.ccr.corp.intel.com> References: <20180914071153.5416-1-jian.j.wang@intel.com> <20180914071153.5416-3-jian.j.wang@intel.com> In-Reply-To: <20180914071153.5416-3-jian.j.wang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into else block X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 02:59:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: Wang, Jian J=20 Sent: Friday, September 14, 2018 3:12 PM To: edk2-devel@lists.01.org Cc: Zeng, Star ; You, Benjamin ; Dong, Eric ; Laszlo Ersek Subject: [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into= else block > v2: > Move InitSmmS3Cr3() into 'else' block because it needs to access > SmmS3ResumeState BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1165 InitSmmS3Cr3 () will update SmmS3ResumeState so moving the calling of it in= to else block to keep the logic consistency. Cc: Star Zeng Cc: Benjamin You Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/= CpuS3.c index 0f6b6ef587..9198fa4e4c 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c @@ -750,12 +750,12 @@ InitSmmS3ResumeState ( if (sizeof (UINTN) =3D=3D sizeof (UINT32)) { SmmS3ResumeState->Signature =3D SMM_S3_RESUME_SMM_32; } - } =20 - // - // Patch SmmS3ResumeState->SmmS3Cr3 - // - InitSmmS3Cr3 (); + // + // Patch SmmS3ResumeState->SmmS3Cr3 + // + InitSmmS3Cr3 (); + } =20 // // Allocate safe memory in ACPI NVS for AP to execute hlt loop in -- 2.16.2.windows.1