diff options
| author | Caleb Connolly <[email protected]> | 2024-02-26 17:26:05 +0000 |
|---|---|---|
| committer | Caleb Connolly <[email protected]> | 2024-03-01 14:44:35 +0000 |
| commit | ca84ba63858a607fe2dabf56ed593d7808d2689d (patch) | |
| tree | 603c3cc19f9df0bc79021774d2f667f3312fe8fc /include | |
| parent | 5b825032957c2613ef2f8f639e949ae02cb5bdff (diff) | |
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 <[email protected]>
Reviewed-by: Sumit Garg <[email protected]>
Tested-by: Sumit Garg <[email protected]> #qcs404
Signed-off-by: Caleb Connolly <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/init.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/init.h b/include/init.h index 9a1951d10a0..630d86729c4 100644 --- a/include/init.h +++ b/include/init.h @@ -168,6 +168,17 @@ defined(CONFIG_SAVE_PREV_BL_FDT_ADDR) * Return: 0 if ok; -ENODATA on error */ int save_prev_bl_data(void); + +/** + * get_prev_bl_fdt_addr - When u-boot is chainloaded, get the address + * of the FDT passed by the previous bootloader. + * + * Return: the address of the FDT passed by the previous bootloader + * or 0 if not found. + */ +phys_addr_t get_prev_bl_fdt_addr(void); +#else +#define get_prev_bl_fdt_addr() 0LLU #endif /** |
