1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #include <cbfs.h> 4 #include <arch/cache.h> 5 #include <program_loading.h> 6 7 void boot_linux(void *kernel_ptr, void *fdt_ptr); 8 arch_prog_run(struct prog * prog)9void arch_prog_run(struct prog *prog) 10 { 11 void (*doit)(void *); 12 13 cache_sync_instructions(); 14 15 switch (prog_cbfs_type(prog)) { 16 case CBFS_TYPE_FIT_PAYLOAD: 17 /* 18 * We only load Linux payloads from the ramstage, so provide a hint to 19 * the linker that the below functions do not need to be included in 20 * earlier stages. 21 */ 22 if (!ENV_RAMSTAGE) 23 break; 24 25 dcache_mmu_disable(); 26 boot_linux(prog_entry(prog), prog_entry_arg(prog)); 27 break; 28 default: 29 doit = prog_entry(prog); 30 doit(prog_entry_arg(prog)); 31 } 32 } 33