diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2021-01-23 01:10:20 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-01-26 03:18:40 +0000 |
commit | 1c5c7bcd1d06eed7343559ee0da484691d409ab6 (patch) | |
tree | 4136118e8cf7c54b3019459558393b338a33408e /MdePkg | |
parent | 3a3501862f73095059bb05cc28147c8e899488f2 (diff) | |
download | edk2-1c5c7bcd1d06eed7343559ee0da484691d409ab6.tar.gz edk2-1c5c7bcd1d06eed7343559ee0da484691d409ab6.tar.bz2 edk2-1c5c7bcd1d06eed7343559ee0da484691d409ab6.zip |
UefiCpuPkg/Library/MpInitLib: Fix AP VolatileRegisters race condition
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3182
Fix the order of operations in ApWakeupFunction() when PcdCpuApLoopMode
is set to HLT mode that uses INIT-SIPI-SIPI to wake APs. In this mode,
volatile state is restored and saved each time a INIT-SIPI-SIPI is sent
to an AP to request a function to be executed on the AP. When the
function is completed the volatile state of the AP is saved. However,
the counters NumApsExecuting and FinishedCount are updated before
the volatile state is saved. This allows for a race condition window
for the BSP that is waiting on these counters to request a new
INIT-SIPI-SIPI before all the APs have completely saved their volatile
state. The fix is to save the AP volatile state before updating the
NumApsExecuting and FinishedCount counters.
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'MdePkg')
0 files changed, 0 insertions, 0 deletions