diff options
author | Jeff Fan <jeff.fan@intel.com> | 2017-04-25 11:22:00 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-12 11:24:28 +0800 |
commit | 55ebbaa92c6e06d769fdaad5514639b6389280a7 (patch) | |
tree | 3c183d8d20f465a830077a6a796ca8aa9c6cad56 /Core/UefiCpuPkg | |
parent | e79c6af384a824b54542de058a01c43b107b1367 (diff) | |
download | edk2-platforms-55ebbaa92c6e06d769fdaad5514639b6389280a7.tar.xz |
UefiCpuPkg/MpLib.c: Set AP state after X2APIC mode enabled
After X2APIC mode is enabled, APs need to be set tp IDLE state, otherwise APs
cannot be waken up by MP PPI services.
https://bugzilla.tianocore.org/show_bug.cgi?id=505
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
(cherry picked from commit 59a119f0fcaed5a7cab4829bb19dd7ffa94e16a0)
Diffstat (limited to 'Core/UefiCpuPkg')
-rw-r--r-- | Core/UefiCpuPkg/Library/MpInitLib/MpLib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c index e5e211de8d..407c44c95e 100644 --- a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -434,6 +434,8 @@ CollectProcessorCount ( IN CPU_MP_DATA *CpuMpData
)
{
+ UINTN Index;
+
//
// Send 1st broadcast IPI to APs to wakeup APs
//
@@ -465,6 +467,12 @@ CollectProcessorCount ( // Enable x2APIC on BSP
//
SetApicMode (LOCAL_APIC_MODE_X2APIC);
+ //
+ // Set BSP/Aps state to IDLE
+ //
+ for (Index = 0; Index < CpuMpData->CpuCount; Index++) {
+ SetApState (&CpuMpData->CpuData[Index], CpuStateIdle);
+ }
}
DEBUG ((DEBUG_INFO, "APIC MODE is %d\n", GetApicMode ()));
//
|