![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/romstage.h>
#include <cbmem.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.h>
#include <program_loading.h>
#include <reset.h>
#include <rmodule.h>
#include <stage_cache.h>
#include <timestamp.h>
#include <security/vboot/vboot_common.h>
Go to the source code of this file.
Functions | |
static void | stack_push (struct postcar_frame *pcf, uint32_t val) |
static void | postcar_frame_prepare (struct postcar_frame *pcf) |
int | postcar_frame_init (struct postcar_frame *pcf, size_t stack_size) |
static void | postcar_var_mtrr_set (const struct var_mtrr_context *ctx, uintptr_t addr, size_t size, msr_t base, msr_t mask) |
void | postcar_frame_add_mtrr (struct postcar_frame *pcf, uintptr_t addr, size_t size, int type) |
void | postcar_frame_add_romcache (struct postcar_frame *pcf, int type) |
static void | postcar_frame_common_mtrrs (struct postcar_frame *pcf) |
void | prepare_and_run_postcar (struct postcar_frame *pcf) |
static void | postcar_commit_mtrrs (struct postcar_frame *pcf) |
static void | finalize_load (uintptr_t *stack_top_ptr, uintptr_t stack_top) |
static void | load_postcar_cbfs (struct prog *prog, struct postcar_frame *pcf) |
void | postcar_enable_tseg_cache (struct postcar_frame *pcf) |
static void | postcar_cache_invalid (void) |
void | run_postcar_phase (struct postcar_frame *pcf) |
Definition at line 118 of file postcar_loader.c.
References prog_segment_loaded(), SEG_FINAL, and stack_top.
Referenced by load_postcar_cbfs(), and run_postcar_phase().
|
static |
Definition at line 129 of file postcar_loader.c.
References rmod_stage_load::cbmem_id, CBMEM_ID_AFTER_CAR, die_with_post_code, finalize_load(), NULL, rmod_stage_load::params, POST_INVALID_ROM, rmod_stage_load::prog, rmodule_stage_load(), postcar_frame::stack, stage_cache_add(), STAGE_POSTCAR, and vboot_run_logic().
Referenced by run_postcar_phase().
Definition at line 169 of file postcar_loader.c.
References BIOS_ERR, board_reset(), and printk.
Referenced by run_postcar_phase().
|
static |
Definition at line 108 of file postcar_loader.c.
References postcar_frame::ctx, var_mtrr_context::max_var_mtrrs, stack_push(), and var_mtrr_context::used_var_mtrrs.
Referenced by run_postcar_phase().
void postcar_enable_tseg_cache | ( | struct postcar_frame * | pcf | ) |
Definition at line 159 of file postcar_loader.c.
References MTRR_TYPE_WRBACK, postcar_frame_add_mtrr(), and smm_region().
Referenced by car_stage_entry(), and fill_postcar_frame().
void postcar_frame_add_mtrr | ( | struct postcar_frame * | pcf, |
uintptr_t | addr, | ||
size_t | size, | ||
int | type | ||
) |
Definition at line 71 of file postcar_loader.c.
References addr, postcar_frame::ctx, postcar_var_mtrr_set(), type, and var_mtrr_set_with_cb().
Referenced by car_stage_entry(), fast_spi_cache_ext_bios_postcar(), fill_postcar_frame(), postcar_enable_tseg_cache(), postcar_frame_add_romcache(), and recover_postcar_frame().
void postcar_frame_add_romcache | ( | struct postcar_frame * | pcf, |
int | type | ||
) |
Definition at line 77 of file postcar_loader.c.
References CACHE_ROM_BASE, CACHE_ROM_SIZE, CONFIG, postcar_frame_add_mtrr(), and type.
Referenced by car_stage_entry(), fill_postcar_frame(), and postcar_frame_common_mtrrs().
|
static |
Definition at line 84 of file postcar_loader.c.
References MTRR_TYPE_WRPROT, postcar_frame_add_romcache(), and postcar_frame::skip_common_mtrr.
Referenced by prepare_and_run_postcar().
int postcar_frame_init | ( | struct postcar_frame * | pcf, |
size_t | stack_size | ||
) |
Definition at line 30 of file postcar_loader.c.
References BIOS_ERR, cbmem_add(), CBMEM_ID_ROMSTAGE_RAM_STACK, KiB, NULL, postcar_frame_prepare(), printk, and postcar_frame::stack.
Referenced by car_stage_entry(), prepare_and_run_postcar(), and romstage_main().
|
static |
Definition at line 25 of file postcar_loader.c.
References postcar_frame::ctx, and var_mtrr_context_init().
Referenced by postcar_frame_init().
|
static |
Definition at line 56 of file postcar_loader.c.
References addr, var_mtrr_context::arg, base, BIOS_DEBUG, postcar_frame::ctx, mask, printk, and stack_push().
Referenced by postcar_frame_add_mtrr().
void prepare_and_run_postcar | ( | struct postcar_frame * | pcf | ) |
Definition at line 95 of file postcar_loader.c.
References die(), fill_postcar_frame(), postcar_frame_common_mtrrs(), postcar_frame_init(), and run_postcar_phase().
Referenced by romstage_main().
void run_postcar_phase | ( | struct postcar_frame * | pcf | ) |
Definition at line 175 of file postcar_loader.c.
References prog::arg, cbmem_top(), console_time_report(), finalize_load(), load_postcar_cbfs(), NULL, postcar_cache_invalid(), postcar_commit_mtrrs(), prog_entry(), PROG_INIT, PROG_POSTCAR, prog_run(), prog_set_arg(), resume_from_stage_cache(), postcar_frame::stack, stage_cache_load_stage(), STAGE_POSTCAR, timestamp_add_now(), and TS_ROMSTAGE_END.
Referenced by car_stage_entry(), prepare_and_run_postcar(), and romstage_main().
|
inlinestatic |
Definition at line 16 of file postcar_loader.c.
References postcar_frame::stack, and val.
Referenced by postcar_commit_mtrrs(), and postcar_var_mtrr_set().