arm: init: export prev_bl_fdt_addr
authorCaleb Connolly <caleb.connolly@linaro.org>
Mon, 26 Feb 2024 17:26:05 +0000 (17:26 +0000)
committerCaleb Connolly <caleb.connolly@linaro.org>
Fri, 1 Mar 2024 14:44:35 +0000 (14:44 +0000)
commitca84ba63858a607fe2dabf56ed593d7808d2689d
tree603c3cc19f9df0bc79021774d2f667f3312fe8fc
parent5b825032957c2613ef2f8f639e949ae02cb5bdff
arm: init: export prev_bl_fdt_addr

When booting U-Boot on board with a locked down first-stage bootloader,
we emulate the Linux boot header. By passing the U-Boot FDT through this
first-stage bootloader and retrieving it afterwards we can pre-populate
the memory nodes and other info like the KASLR address.

Add a function to export the FDT addr so that boards can use it over the
built-in FDT.

Don't check is_addr_accessible() here because we might not yet have a
valid mem_map if it's going to be populated from the FDT, let the board
do their own validation instead.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
arch/arm/lib/save_prev_bl_data.c
include/init.h