From 46b409da483ebfc8d9c868c713f5ad68b62c808e Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 14 May 2021 13:19:43 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54299 Reviewed-by: Elyes Haouas Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/romstage.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/romstage.h b/src/arch/x86/include/arch/romstage.h index 28d29bfdd8..7a2a41773b 100644 --- a/src/arch/x86/include/arch/romstage.h +++ b/src/arch/x86/include/arch/romstage.h @@ -16,17 +16,15 @@ void mainboard_romstage_entry(void); */ struct postcar_frame { - uintptr_t stack; int skip_common_mtrr; - struct var_mtrr_context ctx; + struct var_mtrr_context *mtrr; }; /* - * Initialize postcar_frame object allocating stack from cbmem, - * with stack_size == 0, default 4 KiB is allocated. + * Initialize postcar_frame object. * Returns 0 on success, < 0 on error. */ -int postcar_frame_init(struct postcar_frame *pcf, size_t stack_size); +int postcar_frame_init(struct postcar_frame *pcf); /* * Add variable MTRR covering the provided range with MTRR type. -- cgit v1.2.3