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>
This commit is contained in:
Lou, Yun 2021-02-01 16:28:50 +08:00 committed by mergify[bot]
parent 51b96e4b4c
commit e806bb29cf
1 changed files with 7 additions and 0 deletions

View File

@ -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);