public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jeff Fan <jeff.fan@intel.com>
To: edk2-devel@lists.01.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Feng Tian <feng.tian@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: [PATCH v2 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: Add volatile for parameter NumberToFinish
Date: Tue, 15 Nov 2016 22:08:08 +0800	[thread overview]
Message-ID: <20161115140809.5292-2-jeff.fan@intel.com> (raw)
In-Reply-To: <20161115140809.5292-1-jeff.fan@intel.com>

Adding *volatile* type for NumberToFinish parameter of TransferApToSafeState().

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 4 ++--
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h    | 2 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c
index 9760373..22e2d9a 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c
@@ -107,12 +107,12 @@ VOID
 TransferApToSafeState (
   IN UINT32             ApHltLoopCode,
   IN UINT32             TopOfStack,
-  IN UINT32             *NumberToFinish
+  IN volatile UINT32    *NumberToFinish
   )
 {
   SwitchStack (
     (SWITCH_STACK_ENTRY_POINT) (UINTN) ApHltLoopCode,
-    NumberToFinish,
+    (UINT32 *) NumberToFinish,
     NULL,
     (VOID *) (UINTN) TopOfStack
     );
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index 88d9c85..6688f88 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -837,7 +837,7 @@ VOID
 TransferApToSafeState (
   IN UINT32             ApHltLoopCode,
   IN UINT32             TopOfStack,
-  IN UINT32             *NumberToFinish
+  IN volatile UINT32    *NumberToFinish
   );
 
 #endif
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c
index 6844c3f..8f0935d 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c
@@ -112,7 +112,7 @@ VOID
 TransferApToSafeState (
   IN UINT32             ApHltLoopCode,
   IN UINT32             TopOfStack,
-  IN UINT32             *NumberToFinish
+  IN volatile UINT32    *NumberToFinish
   )
 {
   AsmDisablePaging64 (
-- 
2.9.3.windows.2



  reply	other threads:[~2016-11-15 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 14:08 [PATCH v2 0/2] Add volatile for mNumberToFinish Jeff Fan
2016-11-15 14:08 ` Jeff Fan [this message]
2016-11-15 14:08 ` [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: " Jeff Fan
2016-11-15 16:10 ` [PATCH v2 0/2] " Laszlo Ersek
2016-11-16 18:18   ` Kinney, Michael D
2016-11-16 19:21     ` Laszlo Ersek
2016-11-16 21:14       ` Andrew Fish
2016-11-17  1:10         ` Kinney, Michael D
2016-11-19  0:34           ` Andrew Fish
2016-11-16 19:40     ` Andrew Fish

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=20161115140809.5292-2-jeff.fan@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