From c229fca09ebc3ed300845e5346d59e196461c498 Mon Sep 17 00:00:00 2001 From: Ceping Sun Date: Tue, 2 Jan 2024 03:31:20 -0500 Subject: [PATCH] UefiCpuPkg/MpInitLibUp: Update the ProcessorNumber Update the ProcessorNumber to avoid the assert when creating MpInformation2 HOB. Signed-off-by: Ceping Sun reviewed-by: Min Xu tested-by: Kirill A. Shutemov --- UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c index 86f9fbf9036..1b6e1962a21 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -104,7 +104,8 @@ MpInitLibGetProcessorInfo ( return EFI_INVALID_PARAMETER; } - if (ProcessorNumber != 0) { + // Lower 24 bits contains the actual processor number. + if ((ProcessorNumber &= BIT24 - 1) != 0 ) { return EFI_NOT_FOUND; }