@@ -271,18 +271,15 @@ MadtHeader (
EFI_ACPI_5_1_GIC_STRUCTURE *GicC;
EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE *GicD;
EFI_ACPI_5_1_GIC_MSI_FRAME_STRUCTURE *GicM;
- ARM_PROCESSOR_TABLE *ArmProcessorTable;
ARM_CORE_INFO *ArmCoreInfoTable;
- UINT32 CoreCount, CpuNum;
+ UINTN CoreCount, CpuNum;
EFI_STATUS Status;
- // Get pointer to ARM processor table
- ArmProcessorTable = AmdStyxGetArmProcessorTable();
- ASSERT_EFI_ERROR (ArmProcessorTable == NULL);
- ArmCoreInfoTable = ArmProcessorTable->ArmCpus;
+ // Get pointer to ARM core info table
+ ArmCoreInfoTable = AmdStyxGetArmCoreInfoTable (&CoreCount);
+ ASSERT (ArmCoreInfoTable != NULL);
// Make sure SoC's core count does not exceed what we want to build
- CoreCount = ArmProcessorTable->NumberOfEntries;
ASSERT (CoreCount <= NUM_CORES);
ASSERT (CoreCount <= PcdGet32(PcdSocCoreCount));
@@ -46,7 +46,6 @@ AmdStyxMoveParkedCores(
EFI_PHYSICAL_ADDRESS PenBase;
UINTN PenSize;
UINTN MailboxBase;
- ARM_PROCESSOR_TABLE *ArmProcessorTable;
ARM_CORE_INFO *ArmCoreInfoTable;
UINTN ArmCoreCount;
UINTN CoreNum;
@@ -54,10 +53,8 @@ AmdStyxMoveParkedCores(
UINTN CoreParking;
// Get core information
- ArmProcessorTable = AmdStyxGetArmProcessorTable();
- ASSERT_EFI_ERROR (ArmProcessorTable == NULL);
- ArmCoreInfoTable = ArmProcessorTable->ArmCpus;
- ArmCoreCount = ArmProcessorTable->NumberOfEntries;
+ ArmCoreInfoTable = AmdStyxGetArmCoreInfoTable (&ArmCoreCount);
+ ASSERT (ArmCoreInfoTable != NULL);
// Get Parking area (4KB-aligned, 4KB per core)
MpParkingBase = FixedPcdGet64 (PcdParkingProtocolBase);
The ArmMpCoreInfo configuration table describes the secondary cores that are penned up in PrePeiCore/PrePi and waiting for an SGI to proceed with booting into the next pen. Since this approach is unsafe under a PrePeiCore or PrePi that does not execute in place from flash, move to the platform specific gAmdStyxMpCoreInfoGuid HOB that describes the cores, but does not boot them until we are ready to move them straight into the new pen that we will hand to the OS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Platforms/AMD/Styx/AcpiTables/Madt.c | 11 ++++------- Platforms/AMD/Styx/Drivers/FdtDxe/AArch64/BdsLinuxLoader.c | 7 ++----- 2 files changed, 6 insertions(+), 12 deletions(-)