mirror of https://github.com/acidanthera/audk.git
f6b0cb17b1
In ConfigSmmCodeAccessCheck(), we used gSmst->CurrentlyExecutingCpu to get the current SMM BSP. But ConfigSmmCodeAccessCheck() maybe invoked before executing SmmCoreEntry() and gSmst->CurrentlyExecutingCpu hasn't been updated to the latest value. The code flow is as below: BSPHandler() gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu = CpuIndex; // // when mRestoreSmmConfigurationInS3 is set: // ConfigSmmCodeAccessCheck() // // reads gSmst->CurrentlyExecutingCpu to early // gSmmCpuPrivate->SmmCoreEntry (&gSmmCpuPrivate->SmmCoreEntryContext) // // sets gSmst->CurrentlyExecutingCpu with CopyMem() too late // CopyMem (&gSmmCoreSmst.SmmStartupThisAp, SmmEntryContext, sizeof (EFI_SMM_ENTRY_CONTEXT)); Instead, we should use gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18715 6f19259b-4bc3-4df7-8a09-765794883524 |
||
---|---|---|
.. | ||
CpuDxe | ||
CpuIo2Dxe | ||
CpuIo2Smm | ||
CpuIoPei | ||
CpuMpPei | ||
Include | ||
Library | ||
PiSmmCommunication | ||
PiSmmCpuDxeSmm | ||
ResetVector | ||
SecCore | ||
Universal/Acpi/S3Resume2Pei | ||
Contributions.txt | ||
License.txt | ||
UefiCpuPkg.dec | ||
UefiCpuPkg.dsc | ||
UefiCpuPkg.uni | ||
UefiCpuPkgExtra.uni |