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>
Reviewed-by: Feng Tian <feng.tian@intel.com>
{\r
PROCESSOR_SMM_DESCRIPTOR *Psd;\r
\r
{\r
PROCESSOR_SMM_DESCRIPTOR *Psd;\r
\r
+ //\r
+ // Initialize PROCESSOR_SMM_DESCRIPTOR\r
+ //\r
+ Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);\r
+ CopyMem (Psd, &gcPsd, sizeof (gcPsd));\r
+ Psd->SmmGdtPtr = (UINT64)GdtBase;\r
+ Psd->SmmGdtSize = (UINT32)GdtSize;\r
+\r
if (SmmCpuFeaturesGetSmiHandlerSize () != 0) {\r
//\r
// Install SMI handler provided by library\r
if (SmmCpuFeaturesGetSmiHandlerSize () != 0) {\r
//\r
// Install SMI handler provided by library\r
- //\r
- // Initialize PROCESSOR_SMM_DESCRIPTOR\r
- //\r
- Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);\r
- CopyMem (Psd, &gcPsd, sizeof (gcPsd));\r
- Psd->SmmGdtPtr = (UINT64)GdtBase;\r
- Psd->SmmGdtSize = (UINT32)GdtSize;\r
-\r
//\r
// Initialize values in template before copy\r
//\r
//\r
// Initialize values in template before copy\r
//\r