From: Soeren Moch Date: Mon, 21 Oct 2019 12:06:51 +0200 Subject: [U-Boot] [U-Boot, v2, 3/3] rockchip: config: update CONFIG_SPL_MAX_SIZE for 64bit CPUs In-Reply-To: <20191018075416.29011-3-kever.yang@rock-chips.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > Since we move the ATF bl31 entry for 64bit CPUs to 0x40000, we need to > limit the SPL size in 0x40000(start from 0) so that we don't need to do > the relocate for ATF loading. > Note that there will be separate BSS, STACK and MALLOC heap, so the size > 0x40000(256KB) should be enough for SPL text. > > Signed-off-by: Kever Yang I tested this series on top of v2019.10 with rockpro64-rk3399_defconfig. While it builds fine, it does not work properly: U-Boot TPL 2019.10-00005-g7a0826a4f7-dirty (Oct 21 2019 - 10:12:53) Trying to boot from BOOTROM Returning to boot ROM... U-Boot SPL 2019.10-00005-g7a0826a4f7-dirty (Oct 21 2019 - 10:12:53 +0200) Trying to boot from MMC1 U-Boot TPL 2019.10-00005-g7a0826a4f7-dirty (Oct 21 2019 - 10:12:53) [boot loop] Size of u-boot-spl-nodtb.bin is 387k, so it does not fit in 256K. (Overlap in data section?) Earlier I tried the same u-boot version without this series but with bl31 entry point patched to 0x80000. This loads fine. One question, just for me to understand: Why do we load u-boot SPL into limited space below bl31? Since we do not return to SPL from bl31, we should not need to place SPL in secure DRAM. What do I miss here? Thanks, Soeren