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 <Library/ArmLib.h>
|
||||
|
||||
#include <ArmPlatform.h>
|
||||
@@ -48,7 +47,7 @@ ArmPlatformGetCorePosition FUNCTION
|
||||
ArmPlatformIsPrimaryCore FUNCTION
|
||||
// Extract cpu_id and cluster_id from ARM_SCC_CFGREG48
|
||||
// with cpu_id[0:3] and cluster_id[4:7]
|
||||
LoadConstantToReg (ARM_CTA15A7_SCC_CFGREG48, r1)
|
||||
mov32 r1, ARM_CTA15A7_SCC_CFGREG48
|
||||
ldr r1, [r1]
|
||||
lsr r1, #24
|
||||
|
||||
@@ -62,7 +61,7 @@ ArmPlatformIsPrimaryCore FUNCTION
|
||||
orr r1, r1, r2
|
||||
|
||||
// Keep the Cluster ID and Core ID from the MPID
|
||||
LoadConstantToReg (ARM_CLUSTER_MASK :OR: ARM_CORE_MASK, r2)
|
||||
mov32 r2, ARM_CLUSTER_MASK :OR: ARM_CORE_MASK
|
||||
and r0, r0, r2
|
||||
|
||||
// Compare mpid and boot cpu from ARM_SCC_CFGREG48
|
||||
@@ -79,7 +78,7 @@ ArmPlatformIsPrimaryCore FUNCTION
|
||||
ArmPlatformGetPrimaryCoreMpId FUNCTION
|
||||
// Extract cpu_id and cluster_id from ARM_SCC_CFGREG48
|
||||
// with cpu_id[0:3] and cluster_id[4:7]
|
||||
LoadConstantToReg (ARM_CTA15A7_SCC_CFGREG48, r0)
|
||||
mov32 r0, ARM_CTA15A7_SCC_CFGREG48
|
||||
ldr r0, [r0]
|
||||
lsr r0, #24
|
||||
|
||||
|
Reference in New Issue
Block a user