u-boot/arch/arm
Pali Rohár a2b1db41cf arm: mvebu: Correctly set LOAD_ADDRESS for U-Boot SPL binary in kwbimage
U-Boot SPL for mvebu platform is not compiled as position independent.
Therefore it is required to instruct BootROM to load U-Boot SPL at the
correct address. Loading of kwbimage binary code at specific address can be
now achieved by the new LOAD_ADDRESS token as part of BINARY command in
kwbimage config file.

Update mvebu Makefile to put value of $(CONFIG_SPL_TEXT_BASE) into
LOAD_ADDRESS token when generating kwbimage.cfg from kwbimage.cfg.in.

It is required to update regex for sed to find replacement tokens at any
position on a line in kwbimage config file and not only at the beginning of
the line. This is because LOAD_ADDRESS is specified at the end of line
containing the BINARY command.

It looks like all Armada boards set CONFIG_SPL_TEXT_BASE to value
0x40004030 or 0x40000030. Why this value? It is because main kwbimage
header is at address 0x40004030 or 0x40000000 and it is 32 bytes long.
After the main header there is the binary header, which consist of 1 byte
for type, 3 bytes for size, 1 byte for number of arguments, 3 reserved
bytes and then 4 bytes for each argument. After these arguments comes the
executable code.

So arguments start at address 0x40004028 or 0x40000028. Before commit
e6571f38c9 ("arm: mvebu: Remove dummy BIN header arguments for SPL
binary") there were two (dummy) arguments, which resulted in load address
of 0x40004030 or 0x40000030, always. After that commit (which removed dummy
arguments), load address stayed same due to the 128-bit alignment done by
mkimage.

This patch now reflects the dependency between $(CONFIG_SPL_TEXT_BASE),
load address and dummy kwbimage arguments, and allows the user to adjust
$(CONFIG_SPL_TEXT_BASE) config option to some other value.

For unsupported values, when mkimage/kwbimage cannot set chosen load address
as specified by $(CONFIG_SPL_TEXT_BASE), the build process now fails,
instead of silently generating non-working kwbimage.

Removal of this alignment between $(CONFIG_SPL_TEXT_BASE) and LOAD_ADDRESS
can only be done by compiling U-Boot SPL as position independent. But this
currently is not possible for 32-bit ARM version of U-Boot SPL.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-14 11:39:16 +01:00
..
cpu arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c: Fix spelling of "resetting". 2022-01-13 07:57:49 -05:00
dts mtd: nand: pxa3xx: use marvell, prefix for custom DT properties 2022-01-14 07:47:57 +01:00
include Convert CONFIG_SYS_IMMR to Kconfig 2021-12-27 08:41:38 -05:00
lib Prepare v2022.01-rc3 2021-11-29 12:00:57 -05:00
mach-apple arm: apple: Use watchdog timer for system reset 2022-01-13 06:55:46 +01:00
mach-aspeed ast2600: spl: Locate load buffer in DRAM space 2021-11-17 17:05:00 -05:00
mach-at91 ARM: mach-at91: Add compile time option to choose proper timer 2021-12-16 11:41:45 +02:00
mach-bcm283x arch/arm/mach-bcm283x/msg.c: Fix spelling of "Failed". 2022-01-13 07:57:49 -05:00
mach-bcmstb
mach-cortina
mach-davinci Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
mach-exynos Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
mach-highbank
mach-imx Merge branch 'next' 2022-01-10 14:01:57 -05:00
mach-integrator
mach-ipq40xx
mach-k3 board: siemens: Add support for SIMATIC IOT2050 devices 2021-10-03 14:40:56 -04:00
mach-keystone arch/arm/mach-keystone/ddr3.c: Fix spelling of "resetting". 2022-01-13 07:57:50 -05:00
mach-kirkwood Convert CONFIG_SYS_KWD_CONFIG to Kconfig 2021-12-27 16:20:19 -05:00
mach-lpc32xx arm: lpc32xx: add EA LPC3250 DevKitv2 board support 2021-07-06 14:12:14 -04:00
mach-mediatek arm: mediatek: merge board Kconfigs into mach-mediatek 2021-09-23 14:15:32 -04:00
mach-meson ARM: amlogic: add sm efuse write support and cmd for read/write efuse 2021-10-29 14:06:45 +02:00
mach-mvebu arm: mvebu: Correctly set LOAD_ADDRESS for U-Boot SPL binary in kwbimage 2022-01-14 11:39:16 +01:00
mach-nexell Convert CONFIG_CONS_INDEX et al to Kconfig 2021-12-27 08:41:38 -05:00
mach-octeontx Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-octeontx2 Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-omap2 WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
mach-orion5x Convert CONFIG_88F5182 et al to Kconfig 2021-12-27 16:20:19 -05:00
mach-owl
mach-qemu
mach-rmobile ARM: rmobile: beacon: Enable reference clocks for USB and AVB 2021-10-29 21:52:20 +02:00
mach-rockchip - disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs 2022-01-09 07:56:31 -05:00
mach-s5pc1xx arm: s5pc1xx: Move CONFIG_SYS_CLK_FREQ_C1x0 out of CONFIG namespace 2021-12-27 16:20:18 -05:00
mach-snapdragon board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board 2021-10-31 11:25:38 -04:00
mach-socfpga arm: socfpga: arria10: Enable double peripheral RBF configuration 2021-12-17 12:58:01 +08:00
mach-sti
mach-stm32 serial: Rename SERIAL_SUPPORT to SERIAL 2021-09-04 12:26:01 -04:00
mach-stm32mp stm32mp15: tidy up #ifdefs in cpu.c 2021-11-10 17:07:31 +01:00
mach-sunxi sunxi: Avoid duplicate reset_cpu with SYSRESET enabled 2021-11-04 08:57:19 +01:00
mach-tegra ARM: tegra: Copy memory-region-names property 2021-10-13 14:18:30 -07:00
mach-u8500 board: stemmy: Update documentation 2021-09-01 19:25:37 -04:00
mach-uniphier mmc: Rename MMC_SUPPORT to MMC 2021-09-04 11:42:41 -04:00
mach-versal arm: Migrate GICV2 / GICV3 to Kconfig 2021-08-30 14:13:26 -04:00
mach-versatile WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
mach-zynq spi: Rename SPI_SUPPORT to SPI 2021-09-04 12:26:02 -04:00
mach-zynqmp arm64: zynqmp: allow overriding board name 2021-10-21 08:51:00 +02:00
mach-zynqmp-r5 Convert CONFIG_CPU_FREQ_HZ to Kconfig 2021-12-27 16:20:19 -05:00
thumb1/include/asm/proc-armv
config.mk ARM: Prevent the compiler from using NEON registers 2021-09-02 11:19:58 -04:00
Kconfig arm: apple: Use watchdog timer for system reset 2022-01-13 06:55:46 +01:00
Kconfig.debug
Makefile arm: apple: Add initial support for Apple's M1 SoC 2021-10-31 08:46:44 -04:00