stm32mp: limit size of cacheable DDR in pre-reloc stage
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 4 Sep 2020 10:55:19 +0000 (12:55 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Wed, 21 Oct 2020 16:12:20 +0000 (18:12 +0200)
commit67f9f11f197ff39e4e85e56bca84206ef18ab296
tree07de292e9c7270f10fe067390c8d251de2d92c39
parentc981d67a0444cf31e5a16fe4be79d785eb182385
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>
arch/arm/mach-stm32mp/Kconfig
arch/arm/mach-stm32mp/cpu.c
arch/arm/mach-stm32mp/spl.c