From: Eric Dong Date: Mon, 28 Aug 2017 03:05:00 +0000 (+0800) Subject: UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP. X-Git-Tag: edk2-stable201903~3524 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=d5fdae96e2fc88c4efee2af12da1dbaa47d161a3;p=mirror_edk2.git UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP. 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 Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index 8394572c61..924b9097f2 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1814,7 +1814,7 @@ EnableDisableApWorker ( if (!EnableAP) { SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateDisabled); } else { - SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateIdle); + ResetProcessorToIdleState (ProcessorNumber); } if (HealthFlag != NULL) {