mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/PiSmmCpuDxeSmm:add Ap Rendezvous check in PerformRemainingTasks.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4424 In Relaxed-AP Sync Mode, BSP will not wait for all Aps arrive. However, PerformRemainingTasks() needs to wait all Aps arrive before calling SetMemMapAttributes and ConfigSmmCodeAccessCheck() when mSmmReadyToLock is true. In SetMemMapAttributes(), SmmSetMemoryAttributesEx() will call FlushTlbForAll() that need to start up the aps. So it need to let all aps arrive. Same as SetMemMapAttributes(), ConfigSmmCodeAccessCheck() also will start up the aps. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhihao Li <zhihao.li@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
5bb7bfbe81
commit
9f12d6b6ec
|
@ -1540,6 +1540,19 @@ PerformRemainingTasks (
|
|||
)
|
||||
{
|
||||
if (mSmmReadyToLock) {
|
||||
//
|
||||
// Check if all Aps enter SMM. In Relaxed-AP Sync Mode, BSP will not wait for
|
||||
// all Aps arrive. However,PerformRemainingTasks() needs to wait all Aps arrive before calling
|
||||
// SetMemMapAttributes() and ConfigSmmCodeAccessCheck() when mSmmReadyToLock
|
||||
// is true. In SetMemMapAttributes(), SmmSetMemoryAttributesEx() will call
|
||||
// FlushTlbForAll() that need to start up the aps. So it need to let all
|
||||
// aps arrive. Same as SetMemMapAttributes(), ConfigSmmCodeAccessCheck()
|
||||
// also will start up the aps.
|
||||
//
|
||||
if (EFI_ERROR (SmmCpuRendezvous (NULL, TRUE))) {
|
||||
DEBUG ((DEBUG_ERROR, "PerformRemainingTasks: fail to wait for all AP check in SMM!\n"));
|
||||
}
|
||||
|
||||
//
|
||||
// Start SMM Profile feature
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue