diff options
author | Andre Przywara | 2016-08-23 22:19:30 +0100 |
---|---|---|
committer | Andre Przywara | 2021-01-11 23:19:34 +0000 |
commit | 0e4d5db4e0379da9ca4eee00dbca9773d8718e8e (patch) | |
tree | e98ce2b0f5e746d517d494556e489beacc1744d5 /arch/arm/mach-sunxi | |
parent | 00f8e9c2da2a4aaeb762652e4f029d796eec3c86 (diff) |
sunxi: Add arm64 FEL support
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)
Diffstat (limited to 'arch/arm/mach-sunxi')
0 files changed, 0 insertions, 0 deletions