]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirt/PrePi: make jump to CEntryPoint relative
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 5 Aug 2016 12:02:50 +0000 (14:02 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 11 Aug 2016 10:29:31 +0000 (12:29 +0200)
The ArmVirtPkg platforms that use PrePi have no notion of boot remapped
aliases, so we can simply jump to CEntryPoint() directly rather than
via an absolute reference.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S

index d6be3454183411e2d0ad4c92ea79e659412c5915..1fed84ed0ac376b438a0fe73c3fa0f25e4a59e11 100644 (file)
@@ -27,7 +27,6 @@ GCC_ASM_IMPORT(ArmPlatformStackSet)
 GCC_ASM_EXPORT(_ModuleEntryPoint)\r
 ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)\r
 \r
-StartupAddr:                  .8byte ASM_PFX(CEntryPoint)\r
 ASM_PFX(mSystemMemoryEnd):    .8byte 0\r
 \r
 ASM_PFX(_ModuleEntryPoint):\r
@@ -163,15 +162,11 @@ _PrepareArguments:
   mov   x1, x21\r
   mov   x2, x22\r
 \r
-  // Move sec startup address into a data register\r
-  // Ensure we're jumping to FV version of the code (not boot remapped alias)\r
-  ldr   x4, StartupAddr\r
-\r
   // Jump to PrePiCore C code\r
   //    x0 = MpId\r
   //    x1 = UefiMemoryBase\r
   //    x2 = StacksBase\r
-  blr   x4\r
+  bl    ASM_PFX(CEntryPoint)\r
 \r
 _NeverReturn:\r
   b _NeverReturn\r
index 3215c7d55876bc9478a9d9c0156c967cb051b67a..a0176af91c8f02882f88d963accaf64e1f1d458f 100644 (file)
@@ -27,7 +27,6 @@ GCC_ASM_IMPORT(ArmPlatformStackSet)
 GCC_ASM_EXPORT(_ModuleEntryPoint)\r
 ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)\r
 \r
-StartupAddr:                  .long ASM_PFX(CEntryPoint)\r
 ASM_PFX(mSystemMemoryEnd):    .quad 0\r
 \r
 __relocs:\r
@@ -182,15 +181,11 @@ _PrepareArguments:
   mov   r1, r11\r
   mov   r2, r9\r
 \r
-  // Move sec startup address into a data register\r
-  // Ensure we're jumping to FV version of the code (not boot remapped alias)\r
-  ldr   r4, StartupAddr\r
-\r
   // Jump to PrePiCore C code\r
   //    r0 = MpId\r
   //    r1 = UefiMemoryBase\r
   //    r2 = StacksBase\r
-  blx   r4\r
+  bl    ASM_PFX(CEntryPoint)\r
 \r
 _NeverReturn:\r
   b _NeverReturn\r