and r5, r0, r1\r
\r
_SetSVCMode:\r
- // Enter SVC mode\r
+ // Enter SVC mode, Disable FIQ and IRQ\r
mov r1, #0x13|0x80|0x40\r
msr CPSR_c, r1\r
\r
_GetStackBase:\r
// Compute Base of Normal stacks for CPU Cores\r
// Is it MpCore system\r
- bl ArmIsMpCore\r
+ bl ASM_PFX(ArmIsMpCore)\r
cmp r0, #0\r
// Case it is not an MP Core system. Just setup the primary core\r
beq _SetupUnicoreStack\r
\r
// Is it the Primary Core ?\r
LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCore), r4)\r
- cmp r0, r4\r
+ cmp r5, r4\r
beq _SetupPrimaryCoreStack\r
\r
_SetupSecondaryCoreStack:\r
_InitGlobals:\r
str r2, [r3], #4\r
cmp r3, r1\r
- blt _InitGlobals\r
+ bne _InitGlobals\r
\r
\r
_PrepareArguments:\r