coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
postcar.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <arch/romstage.h>
4 #include <cbmem.h>
5 #include <console/console.h>
6 #include <cpu/x86/mtrr.h>
7 #include <main_decl.h>
8 #include <program_loading.h>
9 #include <timestamp.h>
10 
11 /*
12  * Systems without a native coreboot cache-as-ram teardown may implement
13  * this to use an alternate method.
14  */
15 __weak void late_car_teardown(void) { /* do nothing */ }
16 
17 void main(void)
18 {
20 
21  console_init();
22 
23  /*
24  * CBMEM needs to be recovered because timestamps rely on
25  * the cbmem infrastructure being around. Explicitly recover it.
26  *
27  * On some platforms CBMEM needs to be initialized earlier.
28  * Use cbmem_online() to avoid init CBMEM twice.
29  */
30  if (!cbmem_online())
32 
34 
35  display_mtrrs();
36 
37  /* Load and run ramstage. */
38  run_ramstage();
39 }
int cbmem_initialize(void)
Definition: imd_cbmem.c:88
static int cbmem_online(void)
Definition: cbmem.h:170
asmlinkage void display_mtrrs(void)
Definition: debug.c:186
void console_init(void)
Definition: init.c:49
void timestamp_add_now(enum timestamp_id id)
Definition: timestamp.c:141
__weak void late_car_teardown(void)
Definition: postcar.c:15
void main(void)
Definition: postcar.c:17
void run_ramstage(void)
Definition: prog_loaders.c:85
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
@ TS_POSTCAR_START