summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/PrePi
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-10 15:50:25 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-11 12:29:31 +0200
commit66edb631f8a284a9a0884eb6a41a603112dbff52 (patch)
tree3cc71ef6a0c7b39c63cbd0cde490cb1bf70e0f9c /ArmPlatformPkg/PrePi
parent874883a49d0e85cd5494ab880776c4d103bce80a (diff)
downloadedk2-66edb631f8a284a9a0884eb6a41a603112dbff52.tar.gz
edk2-66edb631f8a284a9a0884eb6a41a603112dbff52.tar.bz2
edk2-66edb631f8a284a9a0884eb6a41a603112dbff52.zip
ArmPlatformPkg RVCT: drop dependency on GCC macro library
The RVCT .asm files include AsmMacroIoLib.h only for the definition of LoadConstantToReg (), which makes it tedious to make change to that file without the risk of making the RVCT assembler unhappy. So simply replace LoadConstantToReg() with mov32, which does the right thing in all cases. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPlatformPkg/PrePi')
-rw-r--r--ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm27
1 files changed, 10 insertions, 17 deletions
diff --git a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm
index a20e3fde0b..023339841f 100644
--- a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm
+++ b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm
@@ -11,11 +11,7 @@
//
//
-#include <AsmMacroIoLib.h>
-#include <Base.h>
-#include <Library/PcdLib.h>
#include <AutoGen.h>
-
#include <Chipset/ArmV7.h>
INCLUDE AsmMacroIoLib.inc
@@ -59,8 +55,8 @@ _SystemMemoryEndInit
cmp r1, #0
bne _SetupStackPosition
- LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), r1)
- LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), r2)
+ mov32 r1, FixedPcdGet32(PcdSystemMemoryBase)
+ mov32 r2, FixedPcdGet32(PcdSystemMemorySize)
sub r2, r2, #1
add r1, r1, r2
// Update the global variable
@@ -71,13 +67,13 @@ _SetupStackPosition
// r1 = SystemMemoryTop
// Calculate Top of the Firmware Device
- LoadConstantToReg (FixedPcdGet32(PcdFdBaseAddress), r2)
- LoadConstantToReg (FixedPcdGet32(PcdFdSize), r3)
+ mov32 r2, FixedPcdGet32(PcdFdBaseAddress)
+ mov32 r3, FixedPcdGet32(PcdFdSize)
sub r3, r3, #1
add r3, r3, r2 // r3 = FdTop = PcdFdBaseAddress + PcdFdSize
// UEFI Memory Size (stacks are allocated in this region)
- LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryUefiRegionSize), r4)
+ mov32 r4, FixedPcdGet32(PcdSystemMemoryUefiRegionSize)
//
// Reserve the memory for the UEFI region (contain stacks on its top)
@@ -108,7 +104,7 @@ _SetupAlignedStack
_SetupOverflowStack
// Case memory at the top of the address space. Ensure the top of the stack is EFI_PAGE_SIZE
// aligned (4KB)
- LoadConstantToReg (EFI_PAGE_MASK, r9)
+ mov32 r9, EFI_PAGE_MASK
and r9, r9, r1
sub r1, r1, r9
@@ -119,22 +115,19 @@ _GetBaseUefiMemory
_GetStackBase
// r1 = The top of the Mpcore Stacks
// Stack for the primary core = PrimaryCoreStack
- LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)
+ mov32 r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize)
sub r10, r1, r2
// Stack for the secondary core = Number of Cores - 1
- LoadConstantToReg (FixedPcdGet32(PcdCoreCount), r0)
- sub r0, r0, #1
- LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r1)
- mul r1, r1, r0
+ mov32 r1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize)
sub r10, r10, r1
// r10 = The base of the MpCore Stacks (primary stack & secondary stacks)
mov r0, r10
mov r1, r8
//ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
- LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)
- LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r3)
+ mov32 r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize)
+ mov32 r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize)
bl ArmPlatformStackSet
// Is it the Primary Core ?