u-boot/arch/arm/cpu
Andre Przywara abb086efd5 sunxi: armv8: fel: move fel_stash variable to the front
To return a 64-bit Allwinner chip back to the 32-bit BootROM code, we
have some embedded AArch32 code that restores the CPU state, before
branching back to the BootROM. At the moment the pointer to the buffer
with that state is located *after* the code, which makes the PC relative
code fragile: adding or removing instructions will change the distance
to that pointer variable.
The "new" Allwinner A523 SoC requires more state to be restored (GICv3
system registers), but we must do that *only* on that SoC. Conditional
compilation sounds like the easiest solution, but would mean that the
distance to that pointer would change.

Solve this rather easily by moving the pointer to the *front* of the
code: we load that pointer in the first instruction, so the distance
would always stay the same. Later in the code we won't need PC relative
addressing anymore, so this code can grow or shrink easily, for instance
due to conditional compilation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2025-03-27 00:26:35 +00:00
..
arm11 arch: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:47 -06:00
arm720t Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
arm920t global: Rename SPL_ to XPL_ 2024-10-11 11:44:48 -06:00
arm926ejs treewide: Add a function to change page permissions 2025-03-14 13:37:54 +02:00
arm946es Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
arm1136 arm: move _end to linker symbols 2024-06-07 16:20:29 -06:00
arm1176 arch: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:47 -06:00
armv7 treewide: Add a function to change page permissions 2025-03-14 13:37:54 +02:00
armv7m treewide: Add a function to change page permissions 2025-03-14 13:37:54 +02:00
armv8 sunxi: armv8: fel: move fel_stash variable to the front 2025-03-27 00:26:35 +00:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot-spl.lds arm: move _end to linker symbols 2024-06-07 16:20:29 -06:00
u-boot.lds arm: move _end to linker symbols 2024-06-07 16:20:29 -06:00