ArmVirtPkg/PrePi: remove ArmPlatformStackLib dependency

ArmPlatformStackLib has hooks into primary/secondary core PCDs and
other ArmPlatformLib related junk, so let's simply set the stack
pointer directly. This is trivial given that our PrePi is unicore
only.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Ard Biesheuvel
2017-11-17 13:25:19 +00:00
parent 0ae69a2e04
commit 523509aeea
4 changed files with 4 additions and 26 deletions

View File

@@ -111,22 +111,12 @@ _GetBaseUefiMemory:
_GetStackBase:
// r1 = The top of the Mpcore Stacks
mov sp, x1
// Stack for the primary core = PrimaryCoreStack
MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
sub x22, x1, x2
// Stack for the secondary core = Number of Cores - 1
MOV32 (x1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
sub x22, x22, x1
// x22 = The base of the MpCore Stacks (primary stack & secondary stacks)
mov x0, x22
mov x1, x20
//ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
MOV32 (x3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
bl ASM_PFX(ArmPlatformStackSet)
mov x0, x20
mov x1, x21
mov x2, x22