summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2023-12-15 16:50:08 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-12-26 07:18:26 +0000
commit41d1c4475b91760982c48403047adeb0a3cb1141 (patch)
tree322d6d54635f61e9b5e2e40608acf8d30552a6d3 /UefiCpuPkg
parent3a4ec6de01209a0310a6e4c63d6941e7a592a457 (diff)
downloadedk2-41d1c4475b91760982c48403047adeb0a3cb1141.tar.gz
edk2-41d1c4475b91760982c48403047adeb0a3cb1141.tar.bz2
edk2-41d1c4475b91760982c48403047adeb0a3cb1141.zip
UefiCpuPkg/PiSmmCpuDxeSmm: Invert ReleaseAllAPs & InitializeDebugAgent
Existing BSP handler stops source level debug, then call ReleaseAllAPs to tell all APs can reset the Present flag to FALSE: InitializeDebugAgent (); /// Stop source level debug ReleaseAllAPs (); /// Tell APs can reset "Present" flag. This patch is to invert ReleaseAllAPs & InitializeDebugAgent: ReleaseAllAPs (); /// Tell APs can reset "Present" flag. InitializeDebugAgent (); /// Stop source level debug After this change, there is no negative impact since SMM source level debug feature doesn't depend on AP's "Present" flag, no impact to the SMM source level debug capability. Instead, the change will benefit the AP source level debug capability to trace its "Present" flag change for SMI exit since the source level debug feature will be stopped after each AP has the chance to reset the state. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@Intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
index bd2c9f841b..9aa9908863 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
@@ -650,6 +650,11 @@ BSPHandler (
//
SmmCpuSyncWaitForAPs (mSmmMpSyncData->SyncContext, ApCount, CpuIndex);
+ //
+ // Signal APs to Reset states/semaphore for this processor
+ //
+ ReleaseAllAPs ();
+
if (mSmmDebugAgentSupport) {
//
// Stop source level debug in BSP handler, the code below will not be
@@ -659,11 +664,6 @@ BSPHandler (
}
//
- // Signal APs to Reset states/semaphore for this processor
- //
- ReleaseAllAPs ();
-
- //
// Perform pending operations for hot-plug
//
SmmCpuUpdate ();