UefiCpuPkg/PiSmmCpuDxeSmm: Decrease mNumberToFinish in AP safe code
We will put APs into hlt-loop in safe code. But we decrease mNumberToFinish before APs enter into the safe code. Paolo pointed out this gap. This patch is to move mNumberToFinish decreasing to the safe code. It could make sure BSP could wait for all APs are running in safe code. https://bugzilla.tianocore.org/show_bug.cgi?id=216 Reported-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -830,12 +830,14 @@ GetAcpiS3EnableFlag (
|
||||
|
||||
@param[in] ApHltLoopCode The 32-bit address of the safe hlt-loop function.
|
||||
@param[in] TopOfStack A pointer to the new stack to use for the ApHltLoopCode.
|
||||
@param[in] NumberToFinish Semaphore of APs finish count.
|
||||
|
||||
**/
|
||||
VOID
|
||||
TransferApToSafeState (
|
||||
IN UINT32 ApHltLoopCode,
|
||||
IN UINT32 TopOfStack
|
||||
IN UINT32 TopOfStack,
|
||||
IN UINT32 *NumberToFinish
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user