blob: 7d9f960dbc989ad62e6bf3a635af6cb51730d399 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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();
switch (prog_cbfs_type(prog)) {
case CBFS_TYPE_FIT_PAYLOAD:
/*
* 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));
}
}
|