- while (secondary_entry_addr = ArmGetMPCoreMailbox(), secondary_entry_addr == 0) {\r
- ArmCallWFI();\r
- // Acknowledge the interrupt and send End of Interrupt signal.\r
- ArmGicAcknowledgeSgiFrom (PcdGet32(PcdGicInterruptInterfaceBase), PRIMARY_CORE_ID);\r
+ // Get the gArmMpCoreInfoPpiGuid\r
+ PpiListSize = 0;\r
+ ArmPlatformGetPlatformPpiList (&PpiListSize, &PpiList);\r
+ PpiListCount = PpiListSize / sizeof(EFI_PEI_PPI_DESCRIPTOR);\r
+ for (Index = 0; Index < PpiListCount; Index++, PpiList++) {\r
+ if (CompareGuid (PpiList->Guid, &gArmMpCoreInfoPpiGuid) == TRUE) {\r
+ break;\r
+ }\r
+ }\r
+\r
+ // On MP Core Platform we must implement the ARM MP Core Info PPI\r
+ ASSERT (Index != PpiListCount);\r
+\r
+ ArmMpCoreInfoPpi = PpiList->Ppi;\r
+ ArmCoreCount = 0;\r
+ Status = ArmMpCoreInfoPpi->GetMpCoreInfo (&ArmCoreCount, &ArmCoreInfoTable);\r
+ ASSERT_EFI_ERROR (Status);\r
+\r
+ // Find the core in the ArmCoreTable\r
+ for (Index = 0; Index < ArmCoreCount; Index++) {\r
+ if ((ArmCoreInfoTable[Index].ClusterId == ClusterId) && (ArmCoreInfoTable[Index].CoreId == CoreId)) {\r
+ break;\r
+ }\r