ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf\r
ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf\r
ArmGicArchLib|ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf\r
- ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf\r
ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf\r
ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.inf\r
\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
_GetStackBase:\r
// r1 = The top of the Mpcore Stacks\r
+ mov sp, r1\r
+\r
// Stack for the primary core = PrimaryCoreStack\r
MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))\r
sub r9, r1, r2\r
\r
- // Stack for the secondary core = Number of Cores - 1\r
- MOV32 (r1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize))\r
- sub r9, r9, r1\r
-\r
- // r9 = The base of the MpCore Stacks (primary stack & secondary stacks)\r
- mov r0, r9\r
- mov r1, r10\r
- //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)\r
- MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))\r
- MOV32 (r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))\r
- bl ASM_PFX(ArmPlatformStackSet)\r
-\r
mov r0, r10\r
mov r1, r11\r
mov r2, r9\r
LzmaDecompressLib\r
PeCoffGetEntryPointLib\r
PrePiLib\r
- ArmPlatformStackLib\r
MemoryAllocationLib\r
HobLib\r
PrePiHobListPointerLib\r