]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
ArmPkg: Create MpCoreInfo PPI and HOB to describe CPU Cores on a MPCore platform
[mirror_edk2.git] / ArmPlatformPkg / PrePi / ModuleEntryPoint.asm
index 965bb003188bf7b1d7449187a3509f61f1b97502..5b56e66b9bba3478053c10536301870863969974 100644 (file)
@@ -49,9 +49,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
@@ -134,14 +134,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