* [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Support no enabled AP case in DxeLib
@ 2021-02-01 8:28 Jason Lou
2021-02-01 8:44 ` Ni, Ray
0 siblings, 1 reply; 2+ messages in thread
From: Jason Lou @ 2021-02-01 8:28 UTC (permalink / raw)
To: devel; +Cc: Jason, Ray Ni, Eric Dong, Laszlo Ersek, Rahul Kumar
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3195
Support system has no enabled AP case in DxeCpuCacheInfoLib.
Otherwise, if the system only has 1 BSP without any enabled AP,
UEFI POST hangs when invoking StartupAllAPs protocol because
EFI_NOT_STARTED is returned.
Signed-off-by: Jason Lou <yun.lou@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
---
UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
index bb788e36146b..d810294e2120 100644
--- a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
+++ b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
@@ -51,6 +51,13 @@ CpuCacheInfoStartupAllCPUs (
EFI_STATUS Status;
Status = MpServices.Protocol->StartupAllAPs (MpServices.Protocol, Procedure, FALSE, NULL, 0, ProcedureArgument, NULL);
+ if (Status == EFI_NOT_STARTED) {
+ //
+ // EFI_NOT_STARTED is returned when there is no enabled AP.
+ // Treat this case as EFI_SUCCESS.
+ //
+ Status = EFI_SUCCESS;
+ }
ASSERT_EFI_ERROR (Status);
Procedure (ProcedureArgument);
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Support no enabled AP case in DxeLib
2021-02-01 8:28 [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Support no enabled AP case in DxeLib Jason Lou
@ 2021-02-01 8:44 ` Ni, Ray
0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ray @ 2021-02-01 8:44 UTC (permalink / raw)
To: Lou, Yun, devel@edk2.groups.io; +Cc: Dong, Eric, Laszlo Ersek, Kumar, Rahul1
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Lou, Yun <yun.lou@intel.com>
> Sent: Monday, February 1, 2021 4:29 PM
> To: devel@edk2.groups.io
> Cc: Lou, Yun <yun.lou@intel.com>; Ni, Ray <ray.ni@intel.com>; Dong, Eric
> <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Kumar, Rahul1
> <rahul1.kumar@intel.com>
> Subject: [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Support no enabled
> AP case in DxeLib
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3195
>
> Support system has no enabled AP case in DxeCpuCacheInfoLib.
> Otherwise, if the system only has 1 BSP without any enabled AP,
> UEFI POST hangs when invoking StartupAllAPs protocol because
> EFI_NOT_STARTED is returned.
>
> Signed-off-by: Jason Lou <yun.lou@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> ---
> UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
> b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
> index bb788e36146b..d810294e2120 100644
> --- a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
> +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
> @@ -51,6 +51,13 @@ CpuCacheInfoStartupAllCPUs (
> EFI_STATUS Status;
>
>
>
> Status = MpServices.Protocol->StartupAllAPs (MpServices.Protocol,
> Procedure, FALSE, NULL, 0, ProcedureArgument, NULL);
>
> + if (Status == EFI_NOT_STARTED) {
>
> + //
>
> + // EFI_NOT_STARTED is returned when there is no enabled AP.
>
> + // Treat this case as EFI_SUCCESS.
>
> + //
>
> + Status = EFI_SUCCESS;
>
> + }
>
> ASSERT_EFI_ERROR (Status);
>
>
>
> Procedure (ProcedureArgument);
>
> --
> 2.28.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-01 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-01 8:28 [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Support no enabled AP case in DxeLib Jason Lou
2021-02-01 8:44 ` Ni, Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox