From 544878b56349a74e8cb7a0e9af899b5f7fc246fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Fri, 9 Aug 2019 11:41:15 +0300 Subject: arch/x86: Add postcar_frame_common_mtrrs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As most platforms will share the subset of enabling both low RAM WB and high ROM WP MTRRs, provide them with a single function. Add possibility for the platform to skip these if required. Change-Id: Id1f8b7682035e654231f6133a42909a36e3e15a1 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34809 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index 606202197e..9aa446ec0a 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -302,6 +302,7 @@ struct postcar_frame { uint32_t upper_mask; int max_var_mtrrs; int num_var_mtrrs; + int skip_common_mtrr; }; /* @@ -322,6 +323,11 @@ void postcar_frame_add_mtrr(struct postcar_frame *pcf, */ void postcar_frame_add_romcache(struct postcar_frame *pcf, int type); +/* + * Add a common MTRR setup most platforms will have as a subset. + */ +void postcar_frame_common_mtrrs(struct postcar_frame *pcf); + /* * Push used MTRR and Max MTRRs on to the stack * and return pointer to stack top. -- cgit v1.2.3