diff options
Diffstat (limited to 'src/arch/arm/boot.c')
-rw-r--r-- | src/arch/arm/boot.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c index 8c876de0b0..b18473b924 100644 --- a/src/arch/arm/boot.c +++ b/src/arch/arm/boot.c @@ -1,14 +1,32 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <cbfs.h> #include <arch/cache.h> #include <program_loading.h> +void boot_linux(void *kernel_ptr, void *fdt_ptr); + void arch_prog_run(struct prog *prog) { void (*doit)(void *); cache_sync_instructions(); - doit = prog_entry(prog); - doit(prog_entry_arg(prog)); + switch (prog_cbfs_type(prog)) { + case CBFS_TYPE_FIT: + /* + * We only load Linux payloads from the ramstage, so provide a hint to + * the linker that the below functions do not need to be included in + * earlier stages. + */ + if (!ENV_RAMSTAGE) + break; + + dcache_mmu_disable(); + boot_linux(prog_entry(prog), prog_entry_arg(prog)); + break; + default: + doit = prog_entry(prog); + doit(prog_entry_arg(prog)); + } } |