summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-10 13:08:57 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-11 12:29:31 +0200
commitdfc2838892e4a69781b06353ef494ba3ddf16488 (patch)
tree06bc42c6d781caba67a7122decbf87327d94e9a1 /ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm
parent16a9fe2ca9cc845cdc31ed8ff8310594c4a34717 (diff)
downloadedk2-dfc2838892e4a69781b06353ef494ba3ddf16488.tar.gz
edk2-dfc2838892e4a69781b06353ef494ba3ddf16488.tar.bz2
edk2-dfc2838892e4a69781b06353ef494ba3ddf16488.zip
ArmVirtPkg: clean up assembly source files
This updates all assembly source files under ArmVirtPkg to mark exported functions as ASM_FUNC(), which puts them in a separate section, allowing the linker to prune code that is left unused. At the same time, clean up the code to get rid of LoadConstantToReg() instances involving symbol references, each of which emits an absolute literal, and hence and entry in the PE/COFF .reloc table. 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 'ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm')
-rw-r--r--ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm10
1 files changed, 1 insertions, 9 deletions
diff --git a/ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm b/ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm
index 7882e63217..b476516f21 100644
--- a/ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm
+++ b/ArmVirtPkg/Library/ArmVirtPlatformLib/ARM/VirtHelper.asm
@@ -11,10 +11,7 @@
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
-#include <AsmMacroIoLib.h>
-#include <Base.h>
#include <Library/ArmLib.h>
-#include <Library/PcdLib.h>
#include <AutoGen.h>
INCLUDE AsmMacroIoLib.inc
@@ -25,10 +22,6 @@
EXPORT ArmPlatformGetCorePosition
EXPORT ArmGetPhysAddrTop
- IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCore
- IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask
- IMPORT _gPcd_FixedAtBuild_PcdCoreCount
-
AREA VirtHelper, CODE, READONLY
ArmPlatformPeiBootAction FUNCTION
@@ -40,8 +33,7 @@ ArmPlatformPeiBootAction FUNCTION
// VOID
// );
ArmPlatformGetPrimaryCoreMpId FUNCTION
- LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)
- ldr r0, [r0]
+ MOV32 r0, FixedPcdGet32 (PcdArmPrimaryCore)
bx lr
ENDFUNC