]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/PrePi: remove ArmPlatformStackLib dependency
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 17 Nov 2017 13:25:19 +0000 (13:25 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 23 Nov 2017 16:05:03 +0000 (16:05 +0000)
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>
ArmVirtPkg/ArmVirt.dsc.inc
ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S
ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf

index 50eb8675d1c08b5c0ddae5b4bf5f76e7fee3ae51..5d7edff104b561300f4f34a4da9296efdd12b852 100644 (file)
@@ -93,7 +93,6 @@
   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
index 3296aedfe9aac671cc304e94a3f0aa087c111f5c..891cf1fcab400c0842035be6a2fb003bafd63040 100644 (file)
@@ -111,22 +111,12 @@ _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
index a918c191432e83ee1d91f625391f1e1b51cf4be2..ced08593e9defe2e65cb185117b15348810ed5ef 100644 (file)
@@ -120,22 +120,12 @@ _GetBaseUefiMemory:
 \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
index e816e9583da84fe7d29c3018bf37db6c9ffa4750..ae9a088c72563fc8f0dfad08fe62ee36caa6c60c 100755 (executable)
@@ -54,7 +54,6 @@
   LzmaDecompressLib\r
   PeCoffGetEntryPointLib\r
   PrePiLib\r
-  ArmPlatformStackLib\r
   MemoryAllocationLib\r
   HobLib\r
   PrePiHobListPointerLib\r