Reviewed-by: Ray Ni <ray...@intel.com>

Thanks,
Ray
> -----Original Message-----
> From: Tan, Dun <dun....@intel.com>
> Sent: Monday, January 8, 2024 1:08 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray...@intel.com>; Laszlo Ersek <ler...@redhat.com>; Kumar,
> Rahul R <rahul.r.ku...@intel.com>; Gerd Hoffmann <kra...@redhat.com>;
> Xu, Min M <min.m...@intel.com>
> Subject: [Patch V3 2/2] 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....@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Cc: Rahul Kumar <rahul1.ku...@intel.com>
> Cc: Gerd Hoffmann <kra...@redhat.com>
> Cc: Min Xu <min.m...@intel.com>
> ---
>  UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> 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;
>    }
> 
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113434): https://edk2.groups.io/g/devel/message/113434
Mute This Topic: https://groups.io/mt/103592279/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to