]> git.baikalelectronics.ru Git - uboot.git/commit
stm32mp: Fix board_get_usable_ram_top()
authorPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 1 Sep 2021 07:56:02 +0000 (09:56 +0200)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 6 Sep 2021 08:00:11 +0000 (10:00 +0200)
commit12438159f97d02d4e534265bdc8ed4f99aa31ad3
tree95d8ea2870afb05c87d0fdddf23452ef51ba970d
parent4591b7c5f06a74b79e406498bd59fea86b1bc6e2
stm32mp: Fix board_get_usable_ram_top()

When booting in EFI, lib/efi_loader/efi_memory.c calls
board_get_usable_ram_top(0) which returns by default
gd->ram_base + gd->ram_size which is the top of DDR.

In case of OPTEE boot, the top of DDR is currently reserved by OPTEE,
board_get_usable_ram_top(0) must return an address outside OPTEE
reserved memory.

gd->ram_top matches this constraint as it has already been initialized
by substracting all DT reserved-memory (included OPTEE memory area).

Fixes: 79dd42eea4ca ("stm32mp: correctly handle board_get_usable_ram_top(0)")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/mach-stm32mp/dram_init.c