From d9eee3d17882ec40f8ca5e231046bbf287ab4369 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 16 Mar 2026 00:54:05 +0100 Subject: arm: relocate: Introduce data-only relocation mode Introduce new mode of relocation which relocates only data, not code. This is mainly meant to relocate data to read-write portion of the RAM, while the code remains in read-only portion of the RAM from which it is allowed to execute. This split configuration is present on various secure cores. The result of the relocation is U-Boot running at its original address, data relocated to the end of DRAM, but with added read-write area offset. The U-Boot binary area is not reserved from the end of the DRAM in this relocation mode, because U-Boot itself is not relocated. Signed-off-by: Marek Vasut --- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/board_f.c b/common/board_f.c index a90dcf3013c..11ad5779115 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -462,7 +462,7 @@ static int reserve_uboot(void) if (CONFIG_IS_ENABLED(SKIP_RELOCATE)) gd->flags |= GD_FLG_SKIP_RELOC; - if (!(gd->flags & GD_FLG_SKIP_RELOC)) { + if (!(gd->flags & GD_FLG_SKIP_RELOC) && !CONFIG_IS_ENABLED(SKIP_RELOCATE_CODE)) { /* * reserve memory for U-Boot code, data & bss * round down to next 4 kB limit -- cgit v1.2.3