From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 5C54921962301 for ; Fri, 14 Sep 2018 00:12:14 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Sep 2018 00:12:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,372,1531810800"; d="scan'208";a="232824641" Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.27]) by orsmga004.jf.intel.com with ESMTP; 14 Sep 2018 00:11:58 -0700 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Star Zeng , Benjamin You , Eric Dong , Laszlo Ersek Date: Fri, 14 Sep 2018 15:11:53 +0800 Message-Id: <20180914071153.5416-3-jian.j.wang@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20180914071153.5416-1-jian.j.wang@intel.com> References: <20180914071153.5416-1-jian.j.wang@intel.com> Subject: [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: Fri, 14 Sep 2018 07:12:14 -0000 > v2: > Move InitSmmS3Cr3() into 'else' block because it needs to access > SmmS3ResumeState BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=1165 InitSmmS3Cr3 () will update SmmS3ResumeState so moving the calling of it into 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) == sizeof (UINT32)) { SmmS3ResumeState->Signature = SMM_S3_RESUME_SMM_32; } - } - // - // Patch SmmS3ResumeState->SmmS3Cr3 - // - InitSmmS3Cr3 (); + // + // Patch SmmS3ResumeState->SmmS3Cr3 + // + InitSmmS3Cr3 (); + } // // Allocate safe memory in ACPI NVS for AP to execute hlt loop in -- 2.16.2.windows.1