Reviewed-by: Ray Ni <[email protected]>

Thanks,
Ray
> -----Original Message-----
> From: Tan, Dun <[email protected]>
> Sent: Monday, January 8, 2024 1:08 PM
> To: [email protected]
> Cc: Ni, Ray <[email protected]>; Laszlo Ersek <[email protected]>; Kumar,
> Rahul R <[email protected]>; Gerd Hoffmann <[email protected]>;
> Xu, Min M <[email protected]>
> 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 <[email protected]>
> Cc: Ray Ni <[email protected]>
> Cc: Laszlo Ersek <[email protected]>
> Cc: Rahul Kumar <[email protected]>
> Cc: Gerd Hoffmann <[email protected]>
> Cc: Min Xu <[email protected]>
> ---
>  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: [email protected]
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to