UefiCpuPkg: Check lower 24 bits of ProcessorNumber

Check lower 24 bits of ProcessorNumber instead of
the value of ProcessorNumber in the API
MpInitLibGetProcessorInfo() of MpInitLibUp instance.
Lower 24 bits of ProcessorNumber contains the actual
processor number.
The BIT24 of input ProcessorNumber might be set to
indicate if the EXTENDED_PROCESSOR_INFORMATION will
be retrived.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Min Xu <min.m.xu@intel.com>
Message-Id: <20240108050804.1718-3-dun.tan@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
duntan 2024-01-08 13:08:04 +08:00 committed by mergify[bot]
parent 2a5c08caaf
commit 08a6528bac

View File

@ -107,7 +107,10 @@ 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;
}