From 66edb631f8a284a9a0884eb6a41a603112dbff52 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Wed, 10 Aug 2016 15:50:25 +0200 Subject: 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 Reviewed-by: Leif Lindholm --- ArmPlatformPkg/PrePeiCore/Arm/Exception.asm | 2 -- ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm | 14 ++++---------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'ArmPlatformPkg/PrePeiCore') 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 -#include #include 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 -#include -#include #include 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) -- cgit v1.2.3