INCLUDE AsmMacroIoLib.inc\r
\r
IMPORT CEntryPoint\r
+ IMPORT ArmPlatformIsPrimaryCore\r
IMPORT ArmReadMpidr\r
IMPORT ArmPlatformStackSet\r
\r
_ModuleEntryPoint\r
// Get ID of this CPU in Multicore system\r
bl ArmReadMpidr\r
- LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCoreMask), r1)\r
- and r6, r0, r1\r
+ // Keep a copy of the MpId register value\r
+ mov r6, r0\r
\r
_SetSVCMode\r
// Enter SVC mode, Disable FIQ and IRQ\r
bl ArmPlatformStackSet\r
\r
// Is it the Primary Core ?\r
- LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCore), r4)\r
- cmp r6, r4\r
+ mov r0, r6\r
+ bl ArmPlatformIsPrimaryCore\r
+ cmp r0, #1\r
bne _PrepareArguments\r
\r
_ReserveGlobalVariable\r