diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/include/arch/romstage.h | 2 | ||||
-rw-r--r-- | src/arch/x86/postcar_loader.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/arch/x86/include/arch/romstage.h b/src/arch/x86/include/arch/romstage.h index 5951766a3c..d637d19b8a 100644 --- a/src/arch/x86/include/arch/romstage.h +++ b/src/arch/x86/include/arch/romstage.h @@ -43,7 +43,7 @@ void fill_postcar_frame(struct postcar_frame *pcf); * prepare_and_run_postcar() determines the stack to use after * cache-as-ram is torn down as well as the MTRR settings to use. */ -void prepare_and_run_postcar(struct postcar_frame *pcf); +void prepare_and_run_postcar(void); /* * Systems without a native coreboot cache-as-ram teardown may implement diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c index b5bfe3e6c9..af8152d72b 100644 --- a/src/arch/x86/postcar_loader.c +++ b/src/arch/x86/postcar_loader.c @@ -21,6 +21,8 @@ static size_t var_mtrr_ctx_size(void) static int postcar_frame_init(struct postcar_frame *pcf) { + memset(pcf, 0, sizeof(*pcf)); + struct var_mtrr_context *ctx; ctx = cbmem_add(CBMEM_ID_ROMSTAGE_RAM_STACK, var_mtrr_ctx_size()); @@ -61,16 +63,18 @@ static void run_postcar_phase(struct postcar_frame *pcf); /* prepare_and_run_postcar() determines the stack to use after * cache-as-ram is torn down as well as the MTRR settings to use. */ -void prepare_and_run_postcar(struct postcar_frame *pcf) +void prepare_and_run_postcar(void) { - if (postcar_frame_init(pcf)) + struct postcar_frame pcf; + + if (postcar_frame_init(&pcf)) die("Unable to initialize postcar frame.\n"); - fill_postcar_frame(pcf); + fill_postcar_frame(&pcf); - postcar_frame_common_mtrrs(pcf); + postcar_frame_common_mtrrs(&pcf); - run_postcar_phase(pcf); + run_postcar_phase(&pcf); /* We do not return here. */ } |