]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Sec/Arm/SecEntryPoint.S
ARM Packages: Replaced the macro GetCorePositionFromMpId() by the ArmPlatformGetCoreP...
[mirror_edk2.git] / ArmPlatformPkg / Sec / Arm / SecEntryPoint.S
index 07fb71fdcc95b12d9c02b5bd23bb130e5d474cd8..5096251a74dd91574eff901302ca2f722cad3b5b 100644 (file)
@@ -20,6 +20,7 @@
 \r
 GCC_ASM_IMPORT(CEntryPoint)\r
 GCC_ASM_IMPORT(ArmPlatformIsPrimaryCore)\r
+GCC_ASM_IMPORT(ArmPlatformGetCorePosition)\r
 GCC_ASM_IMPORT(ArmPlatformSecBootAction)\r
 GCC_ASM_IMPORT(ArmPlatformSecBootMemoryInit)\r
 GCC_ASM_IMPORT(ArmDisableInterrupts)\r
@@ -91,10 +92,11 @@ _SetupSecondaryCoreStack:
   // Get the top of the primary stacks (and the base of the secondary stacks)\r
   LoadConstantToReg (FixedPcdGet32(PcdCPUCoresSecStackBase), r1)\r
   LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecPrimaryStackSize), r2)\r
-  add   r1, r1, r2\r
+  add   r6, r1, r2\r
 \r
-  // Get the Core Position (ClusterId * 4) + CoreId\r
-  GetCorePositionFromMpId(r0, r9, r2)\r
+  // Get the Core Position\r
+  mov   r0, r9\r
+  bl    ASM_PFX(ArmPlatformGetCorePosition)\r
   // The stack starts at the top of the stack region. Add '1' to the Core Position to get the top of the stack\r
   add   r0, r0, #1\r
 \r
@@ -102,7 +104,7 @@ _SetupSecondaryCoreStack:
   LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecSecondaryStackSize), r2)\r
   mul   r0, r0, r2\r
   // SP = StackBase + StackOffset\r
-  add   sp, r1, r0\r
+  add   sp, r6, r0\r
 \r
 _PrepareArguments:\r
   // Move sec startup address into a data register\r