1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2019 Fraunhofer AISEC,
4 * Lukas Auer <lukas.auer@aisec.fraunhofer.de>
13 DECLARE_GLOBAL_DATA_PTR;
15 __weak void board_init_f(ulong dummy)
19 ret = spl_early_init();
21 panic("spl_early_init() failed: %d\n", ret);
25 preloader_console_init();
28 void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
30 typedef void __noreturn (*image_entry_riscv_t)(ulong hart, void *dtb);
34 #if CONFIG_IS_ENABLED(LOAD_FIT) || CONFIG_IS_ENABLED(LOAD_FIT_FULL)
35 fdt_blob = spl_image->fdt_addr;
37 fdt_blob = (void *)gd->fdt_blob;
40 image_entry_riscv_t image_entry =
41 (image_entry_riscv_t)spl_image->entry_point;
42 invalidate_icache_all();
44 debug("image entry point: 0x%lX\n", spl_image->entry_point);
46 ret = smp_call_function(spl_image->entry_point, (ulong)fdt_blob, 0, 0);
50 image_entry(gd->arch.boot_hart, fdt_blob);