diff options
Diffstat (limited to 'src/drivers/amd/agesa')
-rw-r--r-- | src/drivers/amd/agesa/mtrr_fixme.c | 10 | ||||
-rw-r--r-- | src/drivers/amd/agesa/romstage.c | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/drivers/amd/agesa/mtrr_fixme.c b/src/drivers/amd/agesa/mtrr_fixme.c index b8b8ef05e0..1a1818ffee 100644 --- a/src/drivers/amd/agesa/mtrr_fixme.c +++ b/src/drivers/amd/agesa/mtrr_fixme.c @@ -9,6 +9,7 @@ #include <cpu/x86/msr.h> #include <cpu/x86/mtrr.h> #include <northbridge/amd/agesa/agesa_helper.h> +#include <romstage_handoff.h> static void set_range_uc(u32 base, u32 size) { @@ -51,10 +52,11 @@ void fixup_cbmem_to_UC(int s3resume) set_range_uc(top_of_ram - 8 * MiB, 4 * MiB); } -void recover_postcar_frame(struct postcar_frame *pcf, int s3resume) +static void recover_postcar_frame(struct postcar_frame *pcf) { msr_t base, mask; int i; + int s3resume = romstage_handoff_is_resume(); /* Replicate non-UC MTRRs as left behind by AGESA. */ @@ -86,3 +88,9 @@ void recover_postcar_frame(struct postcar_frame *pcf, int s3resume) MTRR_TYPE_WRBACK); } } + +void fill_postcar_frame(struct postcar_frame *pcf) +{ + pcf->skip_common_mtrr = 1; + recover_postcar_frame(pcf); +} diff --git a/src/drivers/amd/agesa/romstage.c b/src/drivers/amd/agesa/romstage.c index 648a0451b3..9abcdd6110 100644 --- a/src/drivers/amd/agesa/romstage.c +++ b/src/drivers/amd/agesa/romstage.c @@ -78,10 +78,7 @@ static void romstage_main(void) romstage_handoff_init(cb->s3resume); - postcar_frame_init(&pcf); - recover_postcar_frame(&pcf, cb->s3resume); - - run_postcar_phase(&pcf); + prepare_and_run_postcar(&pcf); /* We do not return. */ } |