\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