arch/x86/postcar: Set up postcar MTRR in C code
Setting up postcar MTRRs is done when invd is already called so there is no reason to do this in assembly anymore. This also drops the custom code for Quark to set up MTRRs. TESTED on foxconn/g41m and hermes/prodrive that MTRR are properly set in postcar & ramstage. Change-Id: I5ec10e84118197a04de0a5194336ef8bb049bba4 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54299 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -58,7 +58,7 @@ void recover_postcar_frame(struct postcar_frame *pcf, int s3resume)
|
||||
|
||||
/* Replicate non-UC MTRRs as left behind by AGESA.
|
||||
*/
|
||||
for (i = 0; i < pcf->ctx.max_var_mtrrs; i++) {
|
||||
for (i = 0; i < pcf->mtrr->max_var_mtrrs; i++) {
|
||||
mask = rdmsr(MTRR_PHYS_MASK(i));
|
||||
base = rdmsr(MTRR_PHYS_BASE(i));
|
||||
u32 size = ~(mask.lo & ~0xfff) + 1;
|
||||
|
@@ -78,7 +78,7 @@ static void romstage_main(void)
|
||||
|
||||
romstage_handoff_init(cb->s3resume);
|
||||
|
||||
postcar_frame_init(&pcf, HIGH_ROMSTAGE_STACK_SIZE);
|
||||
postcar_frame_init(&pcf);
|
||||
recover_postcar_frame(&pcf, cb->s3resume);
|
||||
|
||||
run_postcar_phase(&pcf);
|
||||
|
Reference in New Issue
Block a user