]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP.
authorEric Dong <eric.dong@intel.com>
Mon, 28 Aug 2017 03:05:00 +0000 (11:05 +0800)
committerEric Dong <eric.dong@intel.com>
Thu, 31 Aug 2017 06:23:41 +0000 (14:23 +0800)
PI has description said If an AP is enabled, then the implementation must
guarantee that a complete initialization sequence is performed on the AP,
so the AP is in a state that is compatible with an MP operating system.
Current implementation just set the AP to idle state when enable this AP
which is not follow spec. This patch fix it.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
UefiCpuPkg/Library/MpInitLib/MpLib.c

index 8394572c6107156779f1b937c4366e5e9480d7e6..924b9097f28e9a2a17f3be1e89df304ebe6eb7ae 100644 (file)
@@ -1814,7 +1814,7 @@ EnableDisableApWorker (
   if (!EnableAP) {\r
     SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateDisabled);\r
   } else {\r
-    SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateIdle);\r
+    ResetProcessorToIdleState (ProcessorNumber);\r
   }\r
 \r
   if (HealthFlag != NULL) {\r