diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/board_f.c | 12 | ||||
-rw-r--r-- | common/board_r.c | 16 | ||||
-rw-r--r-- | common/init/handoff.c | 12 | ||||
-rw-r--r-- | common/spl/Kconfig | 1 |
4 files changed, 25 insertions, 16 deletions
diff --git a/common/board_f.c b/common/board_f.c index ebc934ab810..54c48d42ee9 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -305,6 +305,17 @@ static int setup_mon_len(void) return 0; } +static int setup_spl_handoff(void) +{ +#if CONFIG_IS_ENABLED(HANDOFF) + gd->spl_handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, + sizeof(struct spl_handoff)); + debug("Found SPL hand-off info %p\n", gd->spl_handoff); +#endif + + return 0; +} + __weak int arch_cpu_init(void) { return 0; @@ -873,6 +884,7 @@ static const init_fnc_t init_sequence_f[] = { initf_bootstage, /* uses its own timer, so does not need DM */ event_init, bloblist_maybe_init, + setup_spl_handoff, #if defined(CONFIG_CONSOLE_RECORD_INIT_F) console_record_init, #endif diff --git a/common/board_r.c b/common/board_r.c index 62228a723e1..23ebc41868c 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -152,6 +152,15 @@ static int initr_reloc_global_data(void) */ gd->env_addr += gd->reloc_off; #endif + + /* + * For CONFIG_OF_EMBED case the FDT is embedded into ELF, available by + * __dtb_dt_begin. After U-boot ELF self-relocation to RAM top address + * it is worth to update fdt_blob in global_data + */ + if (IS_ENABLED(CONFIG_OF_EMBED)) + gd->fdt_blob = dtb_dt_embedded(); + #ifdef CONFIG_EFI_LOADER /* * On the ARM architecture gd is mapped to a fixed register (r9 or x18). @@ -287,13 +296,10 @@ static int initr_announce(void) return 0; } -static int initr_binman(void) +static int __maybe_unused initr_binman(void) { int ret; - if (!CONFIG_IS_ENABLED(BINMAN_FDT)) - return 0; - ret = binman_init(); if (ret) printf("binman_init failed:%d\n", ret); @@ -635,7 +641,9 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_EFI_LOADER efi_memory_init, #endif +#ifdef CONFIG_BINMAN_FDT initr_binman, +#endif #ifdef CONFIG_FSP_VERSION2 arch_fsp_init_r, #endif diff --git a/common/init/handoff.c b/common/init/handoff.c index 86c020ee0b9..a7cd065fb38 100644 --- a/common/init/handoff.c +++ b/common/init/handoff.c @@ -5,7 +5,6 @@ * Copyright 2018 Google, Inc */ -#include <bloblist.h> #include <handoff.h> #include <asm/global_data.h> @@ -39,14 +38,3 @@ void handoff_load_dram_banks(struct spl_handoff *ho) bd->bi_dram[i].size = ho->ram_bank[i].size; } } - -struct spl_handoff *handoff_get(void) -{ - struct spl_handoff *handoff; - - handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, - sizeof(struct spl_handoff)); - debug("Found SPL hand-off info %p\n", handoff); - - return handoff; -} diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 045fcac10a5..240543c9c7e 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -462,6 +462,7 @@ config SPL_CUSTOM_SYS_MALLOC_ADDR config SPL_SYS_MALLOC_SIZE hex "Size of the SPL malloc pool" depends on SPL_SYS_MALLOC + default 0x180000 if BIOSEMU && RISCV default 0x100000 config SPL_READ_ONLY |