[edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber

2024-01-03 Thread duntan
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

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber

2024-01-04 Thread Laszlo Ersek
On 1/4/24 08:32, duntan wrote: > 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 b

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber

2024-01-05 Thread Ni, Ray
> > - if (ProcessorNumber != 0) { > > + // > > + // Lower 24 bits contains the actual processor number. > > + // > > + if ((ProcessorNumber & (CPU_V2_EXTENDED_TOPOLOGY - 1)) != 0) { I suggest we explicitly use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY. Using BIT24 clearly tells that processor

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber

2024-01-05 Thread Laszlo Ersek
On 1/5/24 13:55, Ni, Ray wrote: >>> - if (ProcessorNumber != 0) { >>> + // >>> + // Lower 24 bits contains the actual processor number. >>> + // >>> + if ((ProcessorNumber & (CPU_V2_EXTENDED_TOPOLOGY - 1)) != 0) { > I suggest we explicitly use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY. > Using

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber

2024-01-07 Thread duntan
] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber On 1/5/24 13:55, Ni, Ray wrote: >>> - if (ProcessorNumber != 0) { >>> + // >>> + // Lower 24 bits contains the actual processor number. >>> + // >>> + if ((ProcessorNumber & (CPU_