public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD
@ 2016-12-06  3:56 Michael Kinney
  2016-12-06  4:27 ` Fan, Jeff
  2016-12-06  4:51 ` Tian, Feng
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Kinney @ 2016-12-06  3:56 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jiewen Yao, Jeff Fan, Feng Tian

The following commit moved the initialization of the
default PROCESSOR_SMM_DESCRIPTOR from MpService.c to
SmramSaveState.c and made this initialization
conditional on the value returned by the
SmmCpuFeaturesGetSmiHandlerSize() library function.

https://github.com/tianocore/edk2/commit/f12367a0b1de7838f1cb8e0839e168ed7b862333

This changed the behavior of the PiSmmCpuDxeSmm module.
The initialization of the PROCESSOR_SMM_DESCRIPTOR is
moved before the call to SmmCpuFeaturesGetSmiHandlerSize()
to preserve the previous behavior.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
index c37e9e8..b4bc0ec 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
@@ -687,6 +687,14 @@ InstallSmiHandler (
 {
   PROCESSOR_SMM_DESCRIPTOR  *Psd;
 
+  //
+  // Initialize PROCESSOR_SMM_DESCRIPTOR
+  //
+  Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);
+  CopyMem (Psd, &gcPsd, sizeof (gcPsd));
+  Psd->SmmGdtPtr = (UINT64)GdtBase;
+  Psd->SmmGdtSize = (UINT32)GdtSize;
+
   if (SmmCpuFeaturesGetSmiHandlerSize () != 0) {
     //
     // Install SMI handler provided by library
@@ -706,14 +714,6 @@ InstallSmiHandler (
   }
 
   //
-  // Initialize PROCESSOR_SMM_DESCRIPTOR
-  //
-  Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);
-  CopyMem (Psd, &gcPsd, sizeof (gcPsd));
-  Psd->SmmGdtPtr = (UINT64)GdtBase;
-  Psd->SmmGdtSize = (UINT32)GdtSize;
-
-  //
   // Initialize values in template before copy
   //
   gSmiStack             = (UINT32)((UINTN)SmiStack + StackSize - sizeof (UINTN));
-- 
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD
  2016-12-06  3:56 [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD Michael Kinney
@ 2016-12-06  4:27 ` Fan, Jeff
  2016-12-06  4:51 ` Tian, Feng
  1 sibling, 0 replies; 3+ messages in thread
From: Fan, Jeff @ 2016-12-06  4:27 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Tian, Feng

Reviewed-by: Jeff Fan <jeff.fan@intel.com>

-----Original Message-----
From: Kinney, Michael D 
Sent: Tuesday, December 06, 2016 11:57 AM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen; Fan, Jeff; Tian, Feng
Subject: [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD

The following commit moved the initialization of the default PROCESSOR_SMM_DESCRIPTOR from MpService.c to SmramSaveState.c and made this initialization conditional on the value returned by the
SmmCpuFeaturesGetSmiHandlerSize() library function.

https://github.com/tianocore/edk2/commit/f12367a0b1de7838f1cb8e0839e168ed7b862333

This changed the behavior of the PiSmmCpuDxeSmm module.
The initialization of the PROCESSOR_SMM_DESCRIPTOR is moved before the call to SmmCpuFeaturesGetSmiHandlerSize() to preserve the previous behavior.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>---
 UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
index c37e9e8..b4bc0ec 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
@@ -687,6 +687,14 @@ InstallSmiHandler (  {
   PROCESSOR_SMM_DESCRIPTOR  *Psd;
 
+  //
+  // Initialize PROCESSOR_SMM_DESCRIPTOR  //  Psd = 
+ (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);  
+ CopyMem (Psd, &gcPsd, sizeof (gcPsd));  Psd->SmmGdtPtr = 
+ (UINT64)GdtBase;  Psd->SmmGdtSize = (UINT32)GdtSize;
+
   if (SmmCpuFeaturesGetSmiHandlerSize () != 0) {
     //
     // Install SMI handler provided by library @@ -706,14 +714,6 @@ InstallSmiHandler (
   }
 
   //
-  // Initialize PROCESSOR_SMM_DESCRIPTOR
-  //
-  Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);
-  CopyMem (Psd, &gcPsd, sizeof (gcPsd));
-  Psd->SmmGdtPtr = (UINT64)GdtBase;
-  Psd->SmmGdtSize = (UINT32)GdtSize;
-
-  //
   // Initialize values in template before copy
   //
   gSmiStack             = (UINT32)((UINTN)SmiStack + StackSize - sizeof (UINTN));
--
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD
  2016-12-06  3:56 [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD Michael Kinney
  2016-12-06  4:27 ` Fan, Jeff
@ 2016-12-06  4:51 ` Tian, Feng
  1 sibling, 0 replies; 3+ messages in thread
From: Tian, Feng @ 2016-12-06  4:51 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org
  Cc: Yao, Jiewen, Fan, Jeff, Tian, Feng

Reviewed-by: Feng Tian <feng.tian@Intel.com>

Thanks
Feng

-----Original Message-----
From: Kinney, Michael D 
Sent: Tuesday, December 6, 2016 11:57 AM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, Feng <feng.tian@intel.com>
Subject: [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD

The following commit moved the initialization of the default PROCESSOR_SMM_DESCRIPTOR from MpService.c to SmramSaveState.c and made this initialization conditional on the value returned by the
SmmCpuFeaturesGetSmiHandlerSize() library function.

https://github.com/tianocore/edk2/commit/f12367a0b1de7838f1cb8e0839e168ed7b862333

This changed the behavior of the PiSmmCpuDxeSmm module.
The initialization of the PROCESSOR_SMM_DESCRIPTOR is moved before the call to SmmCpuFeaturesGetSmiHandlerSize() to preserve the previous behavior.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
index c37e9e8..b4bc0ec 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
@@ -687,6 +687,14 @@ InstallSmiHandler (  {
   PROCESSOR_SMM_DESCRIPTOR  *Psd;
 
+  //
+  // Initialize PROCESSOR_SMM_DESCRIPTOR  //  Psd = 
+ (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);  
+ CopyMem (Psd, &gcPsd, sizeof (gcPsd));  Psd->SmmGdtPtr = 
+ (UINT64)GdtBase;  Psd->SmmGdtSize = (UINT32)GdtSize;
+
   if (SmmCpuFeaturesGetSmiHandlerSize () != 0) {
     //
     // Install SMI handler provided by library @@ -706,14 +714,6 @@ InstallSmiHandler (
   }
 
   //
-  // Initialize PROCESSOR_SMM_DESCRIPTOR
-  //
-  Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);
-  CopyMem (Psd, &gcPsd, sizeof (gcPsd));
-  Psd->SmmGdtPtr = (UINT64)GdtBase;
-  Psd->SmmGdtSize = (UINT32)GdtSize;
-
-  //
   // Initialize values in template before copy
   //
   gSmiStack             = (UINT32)((UINTN)SmiStack + StackSize - sizeof (UINTN));
--
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-06  4:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-06  3:56 [Patch] UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD Michael Kinney
2016-12-06  4:27 ` Fan, Jeff
2016-12-06  4:51 ` Tian, Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox