]> git.dujemihanovic.xyz Git - u-boot.git/commit
ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top
authorPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 13 Dec 2024 13:26:55 +0000 (14:26 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 17 Dec 2024 15:14:01 +0000 (09:14 -0600)
commit25fb58e88aba0c4af0af554d7b141be3f2e5e0b5
treedf9a6788a1df481eaf4bc9134dab457a40abc8d6
parent1cde96bee57ead9714d0ee2f484e0be4540f3fad
ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top

Previously, all LMB marked with LMB_NOMAP (above and below ram_top)
are considered as invalid entry in TLB.

Since commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top
 even from same bank") all LMB located above ram_top are now marked
LMB_NOOVERWRITE and no more LMB_MAP.

This area above ram_top is reserved for OPTEE and must not be cacheable,
otherwise this leads to a Panic on some boards (Issue on STM32MP135F-DK).

Restore previous behavior by marking invalid entry all TLB above ram_top.

Fixes: 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
cc: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
arch/arm/mach-stm32mp/stm32mp1/cpu.c