diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-10 15:50:25 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-11 12:29:31 +0200 |
commit | 66edb631f8a284a9a0884eb6a41a603112dbff52 (patch) | |
tree | 3cc71ef6a0c7b39c63cbd0cde490cb1bf70e0f9c /ArmPlatformPkg/PrePeiCore | |
parent | 874883a49d0e85cd5494ab880776c4d103bce80a (diff) | |
download | edk2-platforms-66edb631f8a284a9a0884eb6a41a603112dbff52.tar.xz |
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/PrePeiCore')
-rw-r--r-- | ArmPlatformPkg/PrePeiCore/Arm/Exception.asm | 2 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm | 14 |
2 files changed, 4 insertions, 12 deletions
diff --git a/ArmPlatformPkg/PrePeiCore/Arm/Exception.asm b/ArmPlatformPkg/PrePeiCore/Arm/Exception.asm index de438f913a..4ffe258997 100644 --- a/ArmPlatformPkg/PrePeiCore/Arm/Exception.asm +++ b/ArmPlatformPkg/PrePeiCore/Arm/Exception.asm @@ -11,8 +11,6 @@ //
//
-#include <AsmMacroIoLib.h>
-#include <Base.h>
#include <AutoGen.h>
IMPORT PeiCommonExceptionEntry
diff --git a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm index 9a8ca0b174..abea675828 100644 --- a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm +++ b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm @@ -11,9 +11,6 @@ //
//
-#include <AsmMacroIoLib.h>
-#include <Base.h>
-#include <Library/PcdLib.h>
#include <AutoGen.h>
INCLUDE AsmMacroIoLib.inc
@@ -43,9 +40,7 @@ _ModuleEntryPoint bl ArmPlatformIsPrimaryCore
// Get the top of the primary stacks (and the base of the secondary stacks)
- LoadConstantToReg (FixedPcdGet64(PcdCPUCoresStackBase), r1)
- LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)
- add r1, r1, r2
+ mov32 r1, FixedPcdGet64(PcdCPUCoresStackBase) + FixedPcdGet32(PcdCPUCorePrimaryStackSize)
// r0 is equal to 1 if I am the primary core
cmp r0, #1
@@ -62,16 +57,15 @@ _SetupSecondaryCoreStack add r0, r0, #1
// StackOffset = CorePos * StackSize
- LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r2)
+ mov32 r2, FixedPcdGet32(PcdCPUCoreSecondaryStackSize)
mul r0, r0, r2
// SP = StackBase + StackOffset
add sp, r6, r0
_PrepareArguments
// The PEI Core Entry Point has been computed by GenFV and stored in the second entry of the Reset Vector
- LoadConstantToReg (FixedPcdGet32(PcdFvBaseAddress), r2)
- add r2, r2, #4
- ldr r1, [r2]
+ mov32 r2, FixedPcdGet32(PcdFvBaseAddress)
+ ldr r1, [r2, #4]
// Move sec startup address into a data register
// Ensure we're jumping to FV version of the code (not boot remapped alias)
|