mirror of https://github.com/acidanthera/audk.git
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.
f12367a0b1
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>
This commit is contained in:
parent
e4435f710c
commit
a6b7bc7a87
|
@ -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
|
||||
|
@ -705,14 +713,6 @@ InstallSmiHandler (
|
|||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue