summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/PrePi
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-17 13:25:19 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-23 16:05:03 +0000
commit523509aeea7e2d8fe16da30f4c9db94087b052b8 (patch)
treec151d63683f5aca26c6adb45727bb1164e1fb503 /ArmVirtPkg/PrePi
parent0ae69a2e04fa95fc951eb269d93b2fbe2d56d458 (diff)
downloadedk2-523509aeea7e2d8fe16da30f4c9db94087b052b8.tar.gz
edk2-523509aeea7e2d8fe16da30f4c9db94087b052b8.tar.bz2
edk2-523509aeea7e2d8fe16da30f4c9db94087b052b8.zip
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>
Diffstat (limited to 'ArmVirtPkg/PrePi')
-rw-r--r--ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S14
-rw-r--r--ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S14
-rwxr-xr-xArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf1
3 files changed, 4 insertions, 25 deletions
diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
index 3296aedfe9..891cf1fcab 100644
--- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
+++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
@@ -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
diff --git a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S
index a918c19143..ced08593e9 100644
--- a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S
+++ b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S
@@ -120,22 +120,12 @@ _GetBaseUefiMemory:
_GetStackBase:
// r1 = The top of the Mpcore Stacks
+ mov sp, r1
+
// Stack for the primary core = PrimaryCoreStack
MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
sub r9, r1, r2
- // Stack for the secondary core = Number of Cores - 1
- MOV32 (r1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
- sub r9, r9, r1
-
- // r9 = The base of the MpCore Stacks (primary stack & secondary stacks)
- mov r0, r9
- mov r1, r10
- //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
- MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
- MOV32 (r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
- bl ASM_PFX(ArmPlatformStackSet)
-
mov r0, r10
mov r1, r11
mov r2, r9
diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
index e816e9583d..ae9a088c72 100755
--- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
+++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
@@ -54,7 +54,6 @@
LzmaDecompressLib
PeCoffGetEntryPointLib
PrePiLib
- ArmPlatformStackLib
MemoryAllocationLib
HobLib
PrePiHobListPointerLib