[PATCH 1/3] Reserve some RAM at 0 for bl31_0x00000000.bin for Radxa Rock Pi 4.

Xavier Drudis Ferran xdrudis at tinet.cat
Thu Jun 2 13:05:51 CEST 2022


When trying to boot from MMC in a Rock Pi 4 where I shorted
SPI clk to GND to have bootrom load tpl+spl from MMC, SPL
hanged after the message "Trying to boot from MMC1".

With this patch it continued booting, printed two notices
from ATF with BL31 version and date, and loaded U-Boot proper.

I'm not sure if there's something special with the ATF I built,
or what would be a reasonable standard for the size of BL31 at 0
but in my u-boot.its I find

		atf_1 {
			description = "ARM Trusted Firmware";
			data = /incbin/("bl31_0x00000000.bin");
			type = "firmware";
			arch = "arm64";
			os = "arm-trusted-firmware";
			compression = "none";
			load = <0x00000000>;
			entry = <0x00001000>;
		};

and bl31_0x00000000.bin size is 82008 bytes.

0x15000 is 86016 which gives some room for variation and
seems good aligned enough. I don't want to make u-boot too big.

Most other boards which define CONFIG_ROCKCHIP_SPL_RESERVE_IRAM
put it at 0x4000 but in my tests this wasn't enough.

Signed-off-by: Xavier Drudis Ferran <xdrudis at tinet.cat>

---
 configs/rock-pi-4-rk3399_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig
index 8861f13878..510028b095 100644
--- a/configs/rock-pi-4-rk3399_defconfig
+++ b/configs/rock-pi-4-rk3399_defconfig
@@ -7,6 +7,7 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4b"
 CONFIG_ROCKCHIP_RK3399=y
+CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x15000
 CONFIG_TARGET_EVB_RK3399=y
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
-- 
2.20.1



More information about the U-Boot mailing list