mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 22:03:15 +00:00
0e4d5db4e0
So far we did not support the BootROM based FEL USB debug mode on the 64-bit builds for Allwinner SoCs: The BootROM is using AArch32, but the SPL runs in AArch64. Returning back to AArch32 was not working as expected, since the RMR reset into 32-bit mode always starts execution in the BootROM, but not in the FEL routine. After some debug and research and with help via IRC, the CPU hotplug mechanism emerged as a solution: If a certain R_CPUCFG register contains some magic, the BootROM will immediately branch to an address stored in some other register. This works well for our purposes. Enable the FEL feature by providing early AArch32 code to first save the FEL state, *before* initially entering AArch64. If we eventually determine that we should return to FEL, we reset back into AArch32, and use the CPU hotplug mechanism to run some small AArch32 code snippet that restores the initially saved FEL state. That allows the normal AArch64 SPL build to be loaded via the sunxi-fel tool, with it returning into FEL mode, so that other payloads can be transferred via FEL as well. Tested on A64, H5 and H6. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Icenowy Zheng <icenowy@aosc.io> Acked-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Priit Laes <plaes@plaes.org> (on Olimex A64-Olinuxino) |
||
---|---|---|
.. | ||
boot0.h | ||
ccu.h | ||
clock.h | ||
clock_sun4i.h | ||
clock_sun6i.h | ||
clock_sun8i_a83t.h | ||
clock_sun9i.h | ||
clock_sun50i_h6.h | ||
cpu.h | ||
cpu_sun4i.h | ||
cpu_sun9i.h | ||
cpu_sun50i_h6.h | ||
cpucfg.h | ||
display.h | ||
display2.h | ||
dma.h | ||
dma_sun4i.h | ||
dram.h | ||
dram_sun4i.h | ||
dram_sun6i.h | ||
dram_sun8i_a23.h | ||
dram_sun8i_a33.h | ||
dram_sun8i_a83t.h | ||
dram_sun9i.h | ||
dram_sun50i_h6.h | ||
dram_sunxi_dw.h | ||
gpio.h | ||
gtbus.h | ||
gtbus_sun9i.h | ||
i2c.h | ||
lcdc.h | ||
mmc.h | ||
p2wi.h | ||
pmic_bus.h | ||
prcm.h | ||
pwm.h | ||
rsb.h | ||
spl.h | ||
sys_proto.h | ||
timer.h | ||
tve.h | ||
tzpc.h | ||
watchdog.h |