public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP.
@ 2017-08-30  2:21 Eric Dong
  2017-08-31  6:08 ` Ni, Ruiyu
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dong @ 2017-08-30  2:21 UTC (permalink / raw)
  To: edk2-devel; +Cc: Michael Kinney, Ruiyu Ni

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>
---
 UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 8394572..924b909 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) {
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP.
  2017-08-30  2:21 [Patch] UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP Eric Dong
@ 2017-08-31  6:08 ` Ni, Ruiyu
  0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ruiyu @ 2017-08-31  6:08 UTC (permalink / raw)
  To: Dong, Eric, edk2-devel@lists.01.org; +Cc: Kinney, Michael D

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Dong, Eric
> Sent: Wednesday, August 30, 2017 10:22 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Ni, Ruiyu
> <ruiyu.ni@intel.com>
> Subject: [Patch] 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 <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>
> ---
>  UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> index 8394572..924b909 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) {
> --
> 2.7.0.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-31  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30  2:21 [Patch] UefiCpuPkg/Mplib.c: Perform complete initialization when enable AP Eric Dong
2017-08-31  6:08 ` Ni, Ruiyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox