aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/spl.c
diff options
context:
space:
mode:
authorPatrick Delaunay2020-09-04 12:55:19 +0200
committerPatrick Delaunay2020-10-21 18:12:20 +0200
commit67f9f11f197ff39e4e85e56bca84206ef18ab296 (patch)
tree07de292e9c7270f10fe067390c8d251de2d92c39 /arch/arm/mach-stm32mp/spl.c
parentc981d67a0444cf31e5a16fe4be79d785eb182385 (diff)
stm32mp: limit size of cacheable DDR in pre-reloc stage
In pre-reloc stage, U-Boot marks cacheable the DDR limited by the new config CONFIG_DDR_CACHEABLE_SIZE. This patch allows to avoid any speculative access to DDR protected by firewall and used by OP-TEE; the "no-map" reserved memory node in DT are assumed after this limit: STM32_DDR_BASE + DDR_CACHEABLE_SIZE. Without security, in basic boot, the value is equal to STM32_DDR_SIZE. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/spl.c')
-rw-r--r--arch/arm/mach-stm32mp/spl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index e84bdad7bfc..b679b0a6454 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -138,7 +138,8 @@ void board_init_f(ulong dummy)
* to avoid speculative access and issue in get_ram_size()
*/
if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
- mmu_set_region_dcache_behaviour(STM32_DDR_BASE, STM32_DDR_SIZE,
+ mmu_set_region_dcache_behaviour(STM32_DDR_BASE,
+ CONFIG_DDR_CACHEABLE_SIZE,
DCACHE_DEFAULT_OPTION);
}