]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuCacheInfoLib: Support no enabled AP case in DxeLib
authorLou, Yun <Yun.Lou@intel.com>
Mon, 1 Feb 2021 08:28:50 +0000 (16:28 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 3 Feb 2021 07:41:46 +0000 (07:41 +0000)
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>
UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c

index bb788e36146b43c1197b9cad8b9bdb037f77b6a8..d810294e2120c4e7ca1e52441a1a80a4cd0420ad 100644 (file)
@@ -51,6 +51,13 @@ CpuCacheInfoStartupAllCPUs (
   EFI_STATUS                Status;\r
 \r
   Status = MpServices.Protocol->StartupAllAPs (MpServices.Protocol, Procedure, FALSE, NULL, 0, ProcedureArgument, NULL);\r
+  if (Status == EFI_NOT_STARTED) {\r
+    //\r
+    // EFI_NOT_STARTED is returned when there is no enabled AP.\r
+    // Treat this case as EFI_SUCCESS.\r
+    //\r
+    Status = EFI_SUCCESS;\r
+  }\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   Procedure (ProcedureArgument);\r