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>
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include <AsmMacroIoLib.h>
|
||||
#include <Base.h>
|
||||
#include <AutoGen.h>
|
||||
|
||||
IMPORT PeiCommonExceptionEntry
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user