summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library
diff options
context:
space:
mode:
authorduntan <dun.tan@intel.com>2024-01-08 13:08:04 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-01-09 16:31:57 +0000
commit08a6528bac384a7a8baa7e77075dea3291ac36fc (patch)
treeb3fe84ea31c49ef3ff652dab1c38dd5178106767 /UefiCpuPkg/Library
parent2a5c08caaf26568bc8e03cb4195c231af70da35c (diff)
downloadedk2-08a6528bac384a7a8baa7e77075dea3291ac36fc.tar.gz
edk2-08a6528bac384a7a8baa7e77075dea3291ac36fc.tar.bz2
edk2-08a6528bac384a7a8baa7e77075dea3291ac36fc.zip
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>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r--UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c
index d4f8611af8..35590fb4e7 100644
--- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c
+++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c
@@ -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;
}