public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jian J Wang <jian.j.wang@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>,
	Benjamin You <benjamin.you@intel.com>,
	Eric Dong <eric.dong@intel.com>, Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into else block
Date: Fri, 14 Sep 2018 15:11:53 +0800	[thread overview]
Message-ID: <20180914071153.5416-3-jian.j.wang@intel.com> (raw)
In-Reply-To: <20180914071153.5416-1-jian.j.wang@intel.com>

> 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 <star.zeng@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
---
 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



  parent reply	other threads:[~2018-09-14  7:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14  7:11 [PATCH V2 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error Jian J Wang
2018-09-14  7:11 ` [PATCH v2 1/2] " Jian J Wang
2018-09-14 20:08   ` Laszlo Ersek
2018-09-17  2:12     ` Wang, Jian J
2018-09-17  2:55     ` Zeng, Star
2018-09-14  7:11 ` Jian J Wang [this message]
2018-09-17  2:55   ` [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into else block Zeng, Star
2018-09-17  0:29 ` [PATCH V2 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error Dong, Eric

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=20180914071153.5416-3-jian.j.wang@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