coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
boot.c
Go to the documentation of this file.
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 
9 void arch_prog_run(struct prog *prog)
10 {
11  void (*doit)(void *);
12 
14 
15  switch (prog_cbfs_type(prog)) {
16  case CBFS_TYPE_FIT:
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 
27  break;
28  default:
29  doit = prog_entry(prog);
30  doit(prog_entry_arg(prog));
31  }
32 }
void cache_sync_instructions(void)
Definition: cache.c:57
void dcache_mmu_disable(void)
Definition: cache.c:49
void boot_linux(void *kernel_ptr, void *fdt_ptr)
void arch_prog_run(struct prog *prog)
Definition: boot.c:9
@ CBFS_TYPE_FIT
static void * prog_entry(const struct prog *prog)
static void * prog_entry_arg(const struct prog *prog)
static enum cbfs_type prog_cbfs_type(const struct prog *prog)
#define ENV_RAMSTAGE
Definition: rules.h:150
typedef void(X86APIP X86EMU_intrFuncs)(int num)