Pass ARM_CORE_INFO[] directly into the MpInitLib init function so we don't need to rely on an obsolete and unrelated data structure.
Signed-off-by: Ard Biesheuvel <a...@kernel.org> --- ArmPkg/Include/Library/MpInitLib.h | 2 +- ArmPkg/Drivers/CpuDxe/CpuMpInit.c | 10 ++++------ ArmPkg/Library/MpInitLib/DxeMpLib.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ArmPkg/Include/Library/MpInitLib.h b/ArmPkg/Include/Library/MpInitLib.h index 582bb788fd59..7a29fe3e367e 100644 --- a/ArmPkg/Include/Library/MpInitLib.h +++ b/ArmPkg/Include/Library/MpInitLib.h @@ -356,7 +356,7 @@ MpInitLibWhoAmI ( VOID MpInitLibInitialize ( IN UINTN NumberOfProcessors, - IN ARM_PROCESSOR_TABLE *CpuInfo + IN CONST ARM_CORE_INFO *CoreInfo ); #endif /* MP_INITLIB_H_ */ diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpInit.c b/ArmPkg/Drivers/CpuDxe/CpuMpInit.c index 876a29e09b1b..4f5b4268aee5 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuMpInit.c +++ b/ArmPkg/Drivers/CpuDxe/CpuMpInit.c @@ -570,10 +570,9 @@ InitializeMpSupport ( EFI_HOB_GENERIC_HEADER *Hob; VOID *HobData; UINTN HobDataSize; - ARM_PROCESSOR_TABLE CpuInfo; + CONST ARM_CORE_INFO *CoreInfo; MaxCpus = 1; - ZeroMem (&CpuInfo, sizeof (ARM_PROCESSOR_TABLE)); DEBUG ((DEBUG_INFO, "Starting MP services")); @@ -581,9 +580,8 @@ InitializeMpSupport ( if (Hob != NULL) { HobData = GET_GUID_HOB_DATA (Hob); HobDataSize = GET_GUID_HOB_DATA_SIZE (Hob); - CpuInfo.ArmCpus = (ARM_CORE_INFO *)HobData; - CpuInfo.NumberOfEntries = HobDataSize / sizeof (ARM_CORE_INFO); - MaxCpus = CpuInfo.NumberOfEntries; + CoreInfo = (ARM_CORE_INFO *)HobData; + MaxCpus = HobDataSize / sizeof (ARM_CORE_INFO); } if (MaxCpus == 1) { @@ -592,7 +590,7 @@ InitializeMpSupport ( return; } - MpInitLibInitialize (MaxCpus, &CpuInfo); + MpInitLibInitialize (MaxCpus, CoreInfo); // // Now install the MP services protocol. diff --git a/ArmPkg/Library/MpInitLib/DxeMpLib.c b/ArmPkg/Library/MpInitLib/DxeMpLib.c index b00893a5ea7a..5ecd5a2b3366 100644 --- a/ArmPkg/Library/MpInitLib/DxeMpLib.c +++ b/ArmPkg/Library/MpInitLib/DxeMpLib.c @@ -1380,7 +1380,7 @@ FillInProcessorInformation ( VOID MpInitLibInitialize ( IN UINTN NumberOfProcessors, - IN ARM_PROCESSOR_TABLE *CpuInfo + IN CONST ARM_CORE_INFO *CoreInfo ) { EFI_STATUS Status; @@ -1407,7 +1407,7 @@ MpInitLibInitialize ( gProcessorIDs = AllocatePool ((mCpuMpData.NumberOfProcessors + 1) * sizeof (UINT64)); ASSERT (gProcessorIDs != NULL); - FillInProcessorInformation (TRUE, CpuInfo->ArmCpus[0].Mpidr, 0); + FillInProcessorInformation (TRUE, CoreInfo[0].Mpidr, 0); gProcessorIDs[0] = mCpuMpData.CpuData[0].Info.ProcessorId; Status = gBS->CreateEvent ( @@ -1431,7 +1431,7 @@ MpInitLibInitialize ( continue; } - FillInProcessorInformation (FALSE, CpuInfo->ArmCpus[Index].Mpidr, Index); + FillInProcessorInformation (FALSE, CoreInfo[Index].Mpidr, Index); gProcessorIDs[Index] = mCpuMpData.CpuData[Index].Info.ProcessorId; -- 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85090): https://edk2.groups.io/g/devel/message/85090 Mute This Topic: https://groups.io/mt/87803241/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-