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,7 +11,6 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include <AsmMacroIoLib.h>
|
||||
#include <Base.h>
|
||||
#include <Library/ArmLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
@@ -28,9 +27,6 @@
|
||||
EXPORT ArmPlatformGetPrimaryCoreMpId
|
||||
EXPORT ArmPlatformGetCorePosition
|
||||
|
||||
IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCore
|
||||
IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask
|
||||
|
||||
AREA RTSMHelper, CODE, READONLY
|
||||
|
||||
ArmPlatformPeiBootAction FUNCTION
|
||||
@@ -52,8 +48,7 @@ ArmGetScuBaseAddress FUNCTION
|
||||
// VOID
|
||||
// );
|
||||
ArmPlatformGetPrimaryCoreMpId FUNCTION
|
||||
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)
|
||||
ldr r0, [r0]
|
||||
mov32 r0, FixedPcdGet32(PcdArmPrimaryCore)
|
||||
bx lr
|
||||
ENDFUNC
|
||||
|
||||
@@ -99,10 +94,9 @@ _Return
|
||||
// IN UINTN MpId
|
||||
// );
|
||||
ArmPlatformIsPrimaryCore FUNCTION
|
||||
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1)
|
||||
ldr r1, [r1]
|
||||
mov32 r1, FixedPcdGet32(PcdArmPrimaryCoreMask)
|
||||
and r0, r0, r1
|
||||
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1)
|
||||
mov32 r1, FixedPcdGet32(PcdArmPrimaryCore)
|
||||
ldr r1, [r1]
|
||||
cmp r0, r1
|
||||
moveq r0, #1
|
||||
|
Reference in New Issue
Block a user