summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorLou, Yun <Yun.Lou@intel.com>2021-02-01 16:28:50 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-02-03 07:41:46 +0000
commite806bb29cfde1b242bb37e72e77364dd812830e0 (patch)
tree0a73c3173fd6b55e42e33b37dba0c96676574a75 /UefiCpuPkg
parent51b96e4b4cb6d68093f7c7004d4716152ad3ac79 (diff)
downloadedk2-e806bb29cfde1b242bb37e72e77364dd812830e0.tar.gz
edk2-e806bb29cfde1b242bb37e72e77364dd812830e0.tar.bz2
edk2-e806bb29cfde1b242bb37e72e77364dd812830e0.zip
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> Reviewed-by: 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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c
index bb788e3614..d810294e21 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);