mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 02:38:56 +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)
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2000-2003
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
extra-y := start.o
|
|
|
|
obj-y += cpu.o
|
|
ifndef CONFIG_$(SPL_TPL_)TIMER
|
|
obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o
|
|
endif
|
|
obj-y += cache_v8.o
|
|
ifdef CONFIG_SPL_BUILD
|
|
obj-$(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) += exceptions.o
|
|
else
|
|
obj-y += exceptions.o
|
|
obj-y += exception_level.o
|
|
endif
|
|
obj-y += cache.o
|
|
obj-y += tlb.o
|
|
obj-y += transition.o
|
|
ifndef CONFIG_ARMV8_PSCI
|
|
obj-y += fwcall.o
|
|
endif
|
|
obj-y += cpu-dt.o
|
|
obj-$(CONFIG_ARM_SMCCC) += smccc-call.o
|
|
|
|
ifndef CONFIG_SPL_BUILD
|
|
obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o
|
|
else
|
|
obj-$(CONFIG_ARCH_SUNXI) += fel_utils.o
|
|
endif
|
|
obj-$(CONFIG_$(SPL_)ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o
|
|
|
|
ifdef CONFIG_SPL_BUILD
|
|
obj-$(CONFIG_SPL_RECOVER_DATA_SECTION) += spl_data.o
|
|
endif
|
|
|
|
obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/
|
|
obj-$(CONFIG_S32V234) += s32v234/
|
|
obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
|
|
obj-$(CONFIG_ARMV8_PSCI) += psci.o
|
|
obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
|
|
obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
|
|
obj-$(CONFIG_XEN) += xen/
|