coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
stages.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * This file contains entry/exit functions for each stage during coreboot
5  * execution (bootblock entry and ramstage exit will depend on external
6  * loading).
7  *
8  * Entry points should be set in the linker script and honored by CBFS,
9  * so text section layout shouldn't matter. Still, it doesn't hurt to put
10  * stage_entry first (which XXXstage.ld will do automatically through the
11  * .text.stage_entry section created by -ffunction-sections).
12  */
13 
14 #include <cbmem.h>
15 #include <arch/stages.h>
16 
17 /**
18  * generic stage entry point. override this if board specific code is needed.
19  */
20 __weak void stage_entry(uintptr_t stage_arg)
21 {
23  _cbmem_top_ptr = stage_arg;
24  main();
25 }
void main(void)
Definition: romstage.c:13
__weak void stage_entry(uintptr_t stage_arg)
generic stage entry point.
Definition: stages.c:20
uintptr_t _cbmem_top_ptr
Definition: imd_cbmem.c:14
#define ENV_ROMSTAGE_OR_BEFORE
Definition: rules.h:263
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
unsigned long uintptr_t
Definition: stdint.h:21