]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
ArmPlatformPkg/patches: Update the 'PendingPatches' on the latest BaseTools syncup
[mirror_edk2.git] / ArmPlatformPkg / PrePi / ModuleEntryPoint.asm
index e402e2657f4bf4e70baa86da1b301bd34f46c902..5392e80925ab645163688c618dc58b035f5a80e3 100644 (file)
@@ -35,7 +35,7 @@ _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
@@ -99,7 +99,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
@@ -128,10 +128,10 @@ _SetGlobals
   mov   r3, sp\r
   mov   r2, #0x0\r
 _InitGlobals\r
-  str   r2, [r3], #4\r
   cmp   r3, r1\r
-  blt   _InitGlobals\r
-\r
+  beq   _PrepareArguments\r
+  str   r2, [r3], #4\r
+  b     _InitGlobals\r
 \r
 _PrepareArguments\r
   mov   r0, r5\r