]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/ModuleEntryPoint.S
ArmPlatformPkg: Fix initialization of the Global Variable when stack pointer higher...
[mirror_edk2.git] / ArmPlatformPkg / PrePi / ModuleEntryPoint.S
index e19102e72f5bb6d53519894f213ed4fd17cceb5d..ed44710a60e8ab12e1d3b8f6cd6df5882e7f8ead 100755 (executable)
@@ -34,7 +34,7 @@ ASM_PFX(_ModuleEntryPoint):
   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
@@ -77,7 +77,7 @@ _SetupStack:
 _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
@@ -98,7 +98,7 @@ _GetStackBaseMpCore:
 \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
@@ -129,7 +129,7 @@ _SetGlobals:
 _InitGlobals:\r
   str   r2, [r3], #4\r
   cmp   r3, r1\r
-  blt   _InitGlobals\r
+  bne   _InitGlobals\r
 \r
 \r
 _PrepareArguments:\r