ArmPkg: ArmPsciMpServicesDxe: Fix MPIDR usage from CoreInfo

The `GET_MPIDR_AFFINITY_BITS` macro masks MT_BIT in ArmReadMpidr (), but
`CoreInfo[Index].Mpidr` wasn't masked by the same macro which causes a
mismatch even if it is the same MPIDR value.

This change uses the same `GET_MPIDR_AFFINITY_BITS` macro for
`CoreInfo[Index].Mpidr` to fix the core index searching logic.

Signed-off-by: Kun Qin <kuqin@microsoft.com>
This commit is contained in:
Shriram Masanamuthu Chinnathurai 2025-09-11 11:06:29 -07:00 committed by mergify[bot]
parent 1fc19a0d52
commit dfbb7de3c6

View file

@ -1333,7 +1333,7 @@ MpServicesInitialize (
ASSERT (gApStacksBase != NULL);
for (Index = 0; Index < mCpuMpData.NumberOfProcessors; Index++) {
if (GET_MPIDR_AFFINITY_BITS (ArmReadMpidr ()) == CoreInfo[Index].Mpidr) {
if (GET_MPIDR_AFFINITY_BITS (ArmReadMpidr ()) == GET_MPIDR_AFFINITY_BITS (CoreInfo[Index].Mpidr)) {
IsBsp = TRUE;
} else {
IsBsp = FALSE;