INCLUDE AsmMacroIoLib.inc\r
\r
IMPORT CEntryPoint\r
+ IMPORT ArmReadMpidr\r
EXPORT _ModuleEntryPoint\r
\r
PRESERVE8\r
\r
_ModuleEntryPoint\r
// Identify CPU ID\r
- mrc p15, 0, r0, c0, c0, 5\r
- and r0, #0xf\r
+ bl ArmReadMpidr\r
+ // Get ID of this CPU in Multicore system\r
+ LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCoreMask), r1)\r
+ and r0, r0, r1\r
\r
_SetupStack\r
// Setup Stack for the 4 CPU cores\r
ldr r2, StartupAddr\r
\r
// jump to PrePeiCore C code\r
- // r0 = core_id\r
+ // r0 = mp_id\r
// r1 = pei_core_address\r
blx r2\r
\r