u-boot-brain/arch/arm
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
..
cpu ARM: boot0 hook: remove macro, include whole header file 2017-01-04 16:37:41 +01:00
dts arm: dts: s5pc1xx-goni: add the pmic node for using DM 2016-12-22 13:34:01 +09:00
imx-common Makefile: preserve output for images that can contain HAB Blocks 2017-01-02 17:07:39 +01:00
include sunxi: A64: do an RMR switch if started in AArch32 mode 2017-01-04 16:37:42 +01:00
lib ARM: boot0 hook: remove macro, include whole header file 2017-01-04 16:37:41 +01:00
mach-at91 arm, at91: add icache support 2016-10-28 18:37:13 +02:00
mach-bcm283x ARM: bcm283x: Implement EFI RTS reset_system 2016-11-28 20:15:19 -05:00
mach-davinci davinci: omapl138_lcdk: configure ddr2 2016-12-03 13:21:14 -05:00
mach-exynos arm: exynos7420: remove custome low level init function 2016-11-22 11:40:24 -08:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-integrator integrator: switch to DM serial port 2015-08-12 20:47:49 -04:00
mach-keystone ARM: K2G: DDR3: Fix up priv ID for MPU 2016-12-03 13:21:10 -05:00
mach-kirkwood arm: kirkwood: add support for Synology DS109 board 2016-10-09 10:55:32 +02:00
mach-litesom ARM: imx6ul: Add support for liteSOM 2016-12-16 10:31:04 +01:00
mach-meson arm: Disable HVC PSCI calls by default 2016-10-18 09:08:08 +02:00
mach-mvebu mmc: move some SDHCI related options to Kconfig 2016-12-29 13:08:16 -05:00
mach-omap2 SPL: make struct spl_image 64-bit safe 2017-01-04 16:37:41 +01:00
mach-orion5x Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
mach-rmobile armv8: Support loading 32-bit OS in AArch32 execution state 2016-11-22 11:40:24 -08:00
mach-rockchip rockchip: Add support for veyron-minnie (ASUS Chromebook Flip) 2016-11-25 17:59:32 -07:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-snapdragon drivers/sysreset: group sysreset drivers 2016-08-12 09:22:17 -04:00
mach-socfpga qts-filter.sh: strip DOS line endings and handle continuation lines 2016-12-06 01:45:57 +01:00
mach-stm32 Revert "stm32: Change USART port to USART6 for stm32f746 discovery board" 2016-07-21 15:38:13 -04:00
mach-sunxi sunxi: A64: do an RMR switch if started in AArch32 mode 2017-01-04 16:37:42 +01:00
mach-tegra SPL: make struct spl_image 64-bit safe 2017-01-04 16:37:41 +01:00
mach-uniphier Merge branch 'master' of git://git.denx.de/u-boot-uniphier 2016-12-12 07:18:53 -05:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq zynq: nand: Runtime detection of nand buswidth through slcr 2016-11-15 15:27:51 +01:00
thumb1/include/asm/proc-armv arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
config.mk ARMv8: Add secure sections for PSCI text and data 2016-12-15 11:57:25 -08:00
Kconfig ARM: revive CONFIG_USE_ARCH_MEMCPY/MEMSET for UniPhier and Tegra 2016-12-27 11:24:15 -05:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile arm: imx: remove bmode , hdmidet and dek commands from SPL 2017-01-02 17:04:14 +01:00