]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmVirtPkg/PrePi: clear frame pointer in startup code
[mirror_edk2.git] / ArmVirtPkg / PrePi / AArch64 / ModuleEntryPoint.S
index 3296aedfe9aac671cc304e94a3f0aa087c111f5c..99658b9abc7b2cc45fc85539b5edd893cd4ac15d 100644 (file)
@@ -111,26 +111,19 @@ _GetBaseUefiMemory:
 \r
 _GetStackBase:\r
   // r1 = The top of the Mpcore Stacks\r
+  mov   sp, x1\r
+\r
   // Stack for the primary core = PrimaryCoreStack\r
   MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))\r
   sub   x22, x1, x2\r
 \r
-  // Stack for the secondary core = Number of Cores - 1\r
-  MOV32 (x1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize))\r
-  sub   x22, x22, x1\r
-\r
-  // x22 = The base of the MpCore Stacks (primary stack & secondary stacks)\r
-  mov   x0, x22\r
-  mov   x1, x20\r
-  //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)\r
-  MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))\r
-  MOV32 (x3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))\r
-  bl    ASM_PFX(ArmPlatformStackSet)\r
-\r
   mov   x0, x20\r
   mov   x1, x21\r
   mov   x2, x22\r
 \r
+  // Set the frame pointer to NULL so any backtraces terminate here\r
+  mov   x29, xzr\r
+\r
   // Jump to PrePiCore C code\r
   //    x0 = MpId\r
   //    x1 = UefiMemoryBase\r