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>
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
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
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
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