From e806bb29cfde1b242bb37e72e77364dd812830e0 Mon Sep 17 00:00:00 2001 From: "Lou, Yun" Date: Mon, 1 Feb 2021 16:28:50 +0800 Subject: 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 Reviewed-by: Ray Ni Cc: Eric Dong Cc: Laszlo Ersek Cc: Rahul Kumar --- 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 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); -- cgit v1.2.3