]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Sec/Arm/SecEntryPoint.asm
ARM Packages: Replaced the macro GetCorePositionFromMpId() by the ArmPlatformGetCoreP...
[mirror_edk2.git] / ArmPlatformPkg / Sec / Arm / SecEntryPoint.asm
index f89aefd2d6ec91c0227d2802f400a414ebf28b86..14f7e9c6631418fd0a18d1559bf84ce1718035d1 100644 (file)
@@ -19,6 +19,7 @@
   \r
   IMPORT  CEntryPoint\r
   IMPORT  ArmPlatformIsPrimaryCore\r
+  IMPORT  ArmPlatformGetCorePosition\r
   IMPORT  ArmPlatformSecBootAction\r
   IMPORT  ArmPlatformSecBootMemoryInit\r
   IMPORT  ArmDisableInterrupts\r
@@ -93,10 +94,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    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
@@ -104,7 +106,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