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
{
19
late_car_teardown
();
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
())
31
cbmem_initialize
();
32
33
timestamp_add_now
(
TS_POSTCAR_START
);
34
35
display_mtrrs
();
36
37
/* Load and run ramstage. */
38
run_ramstage
();
39
}
romstage.h
cbmem.h
cbmem_initialize
int cbmem_initialize(void)
Definition:
imd_cbmem.c:88
cbmem_online
static int cbmem_online(void)
Definition:
cbmem.h:170
console.h
display_mtrrs
asmlinkage void display_mtrrs(void)
Definition:
debug.c:186
console_init
void console_init(void)
Definition:
init.c:49
timestamp_add_now
void timestamp_add_now(enum timestamp_id id)
Definition:
timestamp.c:141
main_decl.h
late_car_teardown
__weak void late_car_teardown(void)
Definition:
postcar.c:15
main
void main(void)
Definition:
postcar.c:17
program_loading.h
run_ramstage
void run_ramstage(void)
Definition:
prog_loaders.c:85
__weak
const struct smm_save_state_ops *legacy_ops __weak
Definition:
save_state.c:8
timestamp.h
TS_POSTCAR_START
@ TS_POSTCAR_START
Definition:
timestamp_serialized.h:54
mtrr.h
src
arch
x86
postcar.c
Generated by
1.9.1