u-boot-brain/arch/arm
Philipp Tomsich 700f3108d3 rockchip: spl: make boot0 hook TPL safe
When building for a TPL/SPL setup (e.g. on the RK3368), we need the
TPL stage to have the extra space for for the 'Rockchip SPL name'
(i.e. 'RK33' word).  Yet, the SPL will start execution at its first
word (i.e. the first word in the SPL binary needs to be a valid
instruction).  To make things a bit more involved, CONFIG_SPL_BUILD
is defined both for the SPL and the TPL stage.

To avoid having to explicitly test for the first stage (TPL, if and
only if TPL and SPL are built, SPL otherwise), this commit modifies
the sequence to repeat the 'b reset' (instead of reserving 4 bytes
of undefined space) at the start of the boot0 hook: if overwritten
(and execution starts at the second word), the first instruction is
still a 'b reset'... if not overwritten, we start on a 'b reset' as
well.

This solution wouldn't even require the check whether we are in the
SPL/TPL build (i.e. CONFIG_SPL_BUILD), but we leave this check in for
documentation purposes.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-27 14:59:02 +02:00
..
cpu Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2017-07-18 08:42:48 -04:00
dts rockchip: dts: correct vdd_log setting for firefly-rk3399 2017-07-27 14:59:01 +02:00
include rockchip: spl: make boot0 hook TPL safe 2017-07-27 14:59:02 +02:00
lib Revert "armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel" 2017-06-29 21:18:48 -04:00
mach-aspeed aspeed: Refactor SCU to use consistent mask & shift 2017-05-08 11:57:35 -04:00
mach-at91 ARM: atmel: Rename MA5D4EVK 2017-06-29 13:30:27 -04:00
mach-bcm283x bcm2835_wdt: support for the BCM2835/2836 watchdog 2017-05-09 20:30:08 -04:00
mach-davinci common: arm: davinci: Move header file out of common 2017-06-05 12:31:23 -04:00
mach-exynos Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig 2017-07-25 21:08:01 -04:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-imx Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig 2017-07-25 21:08:01 -04:00
mach-integrator Convert CONFIG_ENV_IS_IN_FLASH to Kconfig 2017-07-25 21:20:02 -04:00
mach-keystone arm: mach-keystone: Fixes issue with return values in inline assembly 2017-07-26 11:26:52 -04:00
mach-kirkwood Kconfig: Add a CONFIG_IDE option 2017-05-22 12:45:27 -04:00
mach-meson meson-gx: reserved memory regions 2017-07-22 15:36:18 -04:00
mach-mvebu Convert CONFIG_ENV_IS_IN_SPI_FLASH to Kconfig 2017-07-25 21:31:03 -04:00
mach-omap2 arm: omap3: Detect boot mode very early 2017-07-23 09:24:47 -04:00
mach-orion5x board_f: Drop setup_dram_config() wrapper 2017-04-05 16:36:51 -04:00
mach-rmobile mmc: sh_sdhi: Add MMC version 5.0 support 2017-06-09 20:25:16 +09:00
mach-rockchip rockchip: timer: make register sizes explicit 2017-07-27 14:59:00 +02:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-snapdragon dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
mach-socfpga Convert CONFIG_SPL_BOARD_INIT to Kconfig 2017-05-22 07:29:48 -04:00
mach-sti board: Add STMicroelectronics STiH410-B2260 support 2017-03-14 20:40:21 -04:00
mach-stm32 stm32: Correct positioning of declaration 2017-07-06 16:17:17 -04:00
mach-sunxi Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig 2017-07-25 21:08:01 -04:00
mach-tegra Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig 2017-07-25 21:08:01 -04:00
mach-uniphier ARM: uniphier: remove part number info from the boot log 2017-07-26 22:27:15 +09:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq arm: zynq: Add Kconfig option for any DDR specific initialization 2017-06-20 16:41:44 +02: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 arm: Always keep the dtb section on objcopy 2017-06-05 14:13:11 -04:00
Kconfig Convert CONFIG_ENV_IS_IN_FAT to Kconfig 2017-07-25 21:34:15 -04:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00