GCC_ASM_IMPORT(ArmDisableInterrupts)\r
GCC_ASM_IMPORT(ArmDisableCachesAndMmu)\r
GCC_ASM_IMPORT(ArmWriteVBar)\r
+GCC_ASM_IMPORT(ArmReadMpidr)\r
GCC_ASM_IMPORT(SecVectorTable)\r
\r
#if (FixedPcdGet32(PcdMPCoreSupport))\r
_IdentifyCpu: \r
# Identify CPU ID\r
bl ASM_PFX(ArmReadMpidr)\r
- and r5, r0, #0xf\r
+ // Get ID of this CPU in Multicore system\r
+ LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCoreMask), r1)\r
+ and r5, r0, r1\r
\r
#get ID of this CPU in Multicore system\r
- cmp r5, #0\r
+ LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCore), r1)\r
+ cmp r5, r1\r
# Only the primary core initialize the memory (SMC)\r
beq _InitMem\r
\r