diff options
author | Zhihao Li <zhihao.li@intel.com> | 2023-04-25 14:00:39 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-05-31 09:23:01 +0000 |
commit | 9f12d6b6ecf8ffe9cd4d93fe0976fdbaf2ded4f0 (patch) | |
tree | c1e7600d440b526d80059cd7a3feafb3ff3a65e4 /UefiCpuPkg | |
parent | 5bb7bfbe81e3fd6ffbc3909a96a87e685cfc267d (diff) | |
download | edk2-9f12d6b6ecf8ffe9cd4d93fe0976fdbaf2ded4f0.zip edk2-9f12d6b6ecf8ffe9cd4d93fe0976fdbaf2ded4f0.tar.gz edk2-9f12d6b6ecf8ffe9cd4d93fe0976fdbaf2ded4f0.tar.bz2 |
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index c0e368e..2144d6a 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -1541,6 +1541,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
//
if (FeaturePcdGet (PcdCpuSmmProfileEnable)) {
|