diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-11-11 13:25:51 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-11-15 09:47:32 +0800 |
commit | ec8a387700905bf2776f304576d1fb3b969ad16a (patch) | |
tree | 3a4c8efbca9acf50d4c9c15b45f6814703bf2a24 /UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | |
parent | 45e3440ac208e5b55fbaed0f1e2ff6b004d51742 (diff) | |
download | edk2-ec8a387700905bf2776f304576d1fb3b969ad16a.tar.gz edk2-ec8a387700905bf2776f304576d1fb3b969ad16a.tar.bz2 edk2-ec8a387700905bf2776f304576d1fb3b969ad16a.zip |
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>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h index 6c98659389..88d9c85db6 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h @@ -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
|