]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/ModuleEntryPoint.S
Arm Packages: Fix builds for XCODE32 toolchain
[mirror_edk2.git] / ArmPlatformPkg / PrePi / ModuleEntryPoint.S
index b5f2ee2e57a583ae4fdd8d9d1d6af6ef79bb7bcc..bb1d99449f2c09a26b2434e4f46ef9d414cd5277 100755 (executable)
@@ -21,7 +21,7 @@
 \r
 GCC_ASM_IMPORT(CEntryPoint)\r
 GCC_ASM_IMPORT(ArmReadMpidr)\r
-GCC_ASM_IMPORT(ArmIsMPCore)\r
+GCC_ASM_IMPORT(ArmIsMpCore)\r
 GCC_ASM_EXPORT(_ModuleEntryPoint)\r
 \r
 StartupAddr: .word    CEntryPoint\r
@@ -48,9 +48,9 @@ _SetupStackPosition:
   add   r1, r1, r2      // r1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize\r
 \r
   // Calculate Top of the Firmware Device\r
-  LoadConstantToReg (FixedPcdGet32(PcdNormalFdBaseAddress), r2)\r
-  LoadConstantToReg (FixedPcdGet32(PcdNormalFdSize), r3)\r
-  add   r3, r3, r2      // r4 = FdTop = PcdNormalFdBaseAddress + PcdNormalFdSize\r
+  LoadConstantToReg (FixedPcdGet32(PcdFdBaseAddress), r2)\r
+  LoadConstantToReg (FixedPcdGet32(PcdFdSize), r3)\r
+  add   r3, r3, r2      // r4 = FdTop = PcdFdBaseAddress + PcdFdSize\r
 \r
   // UEFI Memory Size (stacks are allocated in this region)\r
   LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryUefiRegionSize), r4)\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
@@ -133,14 +133,21 @@ _InitGlobals:
 \r
 \r
 _PrepareArguments:\r
+  mov   r0, r5\r
+  mov   r1, r6\r
+  mov   r2, r7\r
+  mov   r3, sp\r
+\r
   // Move sec startup address into a data register\r
   // Ensure we're jumping to FV version of the code (not boot remapped alias)\r
-  ldr   r2, StartupAddr\r
+  ldr   r4, StartupAddr\r
 \r
   // Jump to PrePiCore C code\r
   //    r0 = MpId\r
   //    r1 = UefiMemoryBase\r
-  blx   r2\r
+  //    r2 = StacksBase\r
+  //    r3 = GlobalVariableBase\r
+  blx   r4\r
 \r
 _NeverReturn:\r
   b _NeverReturn\r