u-boot/arch/arm/include/asm/arch-sunxi
Andre Przywara 83843c9b3a sunxi: A64: do an RMR switch if started in AArch32 mode
The Allwinner A64 SoC starts execution in AArch32 mode, and both
the boot ROM and Allwinner's boot0 keep running in this mode.
So U-Boot gets entered in 32-bit, although we want it to run in AArch64.

By using a "magic" instruction, which happens to be an almost-NOP in
AArch64 and a branch in AArch32, we differentiate between being
entered in 64-bit or 32-bit mode.
If in 64-bit mode, we proceed with the branch to reset, but in 32-bit
mode we trigger an RMR write to bring the core into AArch64/EL3 and
re-enter U-Boot at CONFIG_SYS_TEXT_BASE.
This allows a 64-bit U-Boot to be both entered in 32 and 64-bit mode,
so we can use the same start code for the SPL and the U-Boot proper.

We use the existing custom header (boot0.h) functionality, but restrict
the existing boot0 header reservation to the non-SPL build now. A SPL
wouldn't need such header anyway. This allows to have both options
defined and lets us use one for the SPL and the other for U-Boot proper.

Also add arch/arm/mach-sunxi/rmr_switch.S, which contains the original
ARM assembly code and instructions how to re-generate the encoded
version.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-01-04 16:37:42 +01:00
..
boot0.h sunxi: A64: do an RMR switch if started in AArch32 mode 2017-01-04 16:37:42 +01:00
clock.h sunxi: Add support for Allwinner A64 SoCs 2016-04-01 09:52:28 +02:00
clock_sun4i.h sunxi: Add missing macros to configure the NAND controller clk 2016-07-24 20:36:28 -05:00
clock_sun6i.h sunxi: Tune H3 DRAM PLL to improve lock time 2016-08-26 16:58:37 +02:00
clock_sun8i_a83t.h sunxi: clk: Fix USB PHY clock macros for A83T 2016-03-31 17:04:08 +02:00
clock_sun9i.h sunxi: add initial clock setup for sun9i for SPL 2016-10-30 11:38:04 +01:00
cpu.h sun9i: Add cpu_sun9i.h with iomem defines 2015-01-22 12:34:55 +01:00
cpu_sun4i.h sunxi: fix SID read on H3 2016-12-20 16:08:50 +01:00
cpu_sun9i.h sunxi: Add support for SID e-fuses on sun9i 2016-10-30 11:38:04 +01:00
cpucfg.h sunxi: Add CPUCFG debug lock and sun7i cpu power controls 2016-06-20 22:44:00 +02:00
display.h sunxi: display: Fix composite video out on sun5i 2015-08-14 08:37:36 +02:00
dma.h sunxi: Add DMA definitions 2015-05-29 13:46:36 +02:00
dma_sun4i.h sunxi: Add DMA definitions 2015-05-29 13:46:36 +02:00
dram.h sunxi: DRAM initialisation for sun9i 2016-10-30 11:38:04 +01:00
dram_sun4i.h sunxi: Make DRAM_ODT_EN Kconfig setting a bool 2015-05-19 18:46:44 +02:00
dram_sun6i.h sun6i: Add dram initialization code 2014-11-13 14:49:01 +01:00
dram_sun8i_a23.h sunxi: Make DRAM_ODT_EN Kconfig setting a bool 2015-05-19 18:46:44 +02:00
dram_sun8i_a33.h sunxi: Add a33 dram init code 2015-05-04 16:51:51 +02:00
dram_sun8i_a83t.h sunxi: Add support for LPDDR3 for A83T 2016-01-26 16:20:05 +01:00
dram_sun8i_h3.h sunxi: Add H3 DRAM initialization support 2015-11-22 11:31:00 +01:00
dram_sun9i.h sunxi: DRAM initialisation for sun9i 2016-10-30 11:38:04 +01:00
gpio.h sunxi: display: Use PWM to drive backlight where applicable 2016-08-26 16:58:37 +02:00
gtbus.h sunxi: add gtbus-initialisation for sun9i 2016-10-30 11:38:04 +01:00
gtbus_sun9i.h sunxi: add gtbus-initialisation for sun9i 2016-10-30 11:38:04 +01:00
i2c.h sunxi: Add support for the I2C controller which is part of the PRCM 2016-01-21 07:30:01 +01:00
mmc.h sunxi: Use BROM stored boot_media value to determine our boot-source 2016-07-15 15:54:56 +02:00
p2wi.h sun6i: Add new p2wi controller driver 2014-11-13 14:49:01 +01:00
pmic_bus.h sunxi: axp: Move axp pmic register helpers to a separate file 2015-05-04 16:51:53 +02:00
prcm.h sunxi: Group cpu core related controls together 2016-06-20 22:44:00 +02:00
pwm.h sunxi: display: Use PWM to drive backlight where applicable 2016-08-26 16:58:37 +02:00
rsb.h sunxi: rsb: Move rsb_set_device_mode() call to rsb_init() 2015-02-02 13:55:14 +01:00
spl.h sunxi: FEL - Add the ability to recognize and auto-import uEnv-style data 2016-07-15 08:34:34 +02:00
sys_proto.h sunxi: Fix gmac not working due to cpu_eth_init no longer being called 2016-03-23 22:04:13 +01:00
timer.h sunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool 2015-05-04 16:51:51 +02:00
tzpc.h sunxi: Support Secure Memory Touch Arbiter (SMTA) in sun8i H3 2016-01-26 16:20:04 +01:00
usb_phy.h sunxi: musb: Power off OTG port VBUS when disabled 2016-09-17 14:37:40 +02:00
watchdog.h sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I 2014-11-05 13:09:58 +01:00