cpu/x86: Reduce scope of MTRR functions used locally

Change-Id: Ic00358ee5b05d011a95d85ec355adef71c39a529
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76193
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2023-06-28 06:16:27 +03:00 committed by Felix Held
parent 56c09fb5fd
commit e01742bf3d
2 changed files with 3 additions and 5 deletions

View File

@ -346,13 +346,13 @@ static void commit_fixed_mtrrs(void)
fixed_mtrrs_hide_amd_rwdram(); fixed_mtrrs_hide_amd_rwdram();
} }
void x86_setup_fixed_mtrrs_no_enable(void) static void x86_setup_fixed_mtrrs_no_enable(void)
{ {
calc_fixed_mtrrs(); calc_fixed_mtrrs();
commit_fixed_mtrrs(); commit_fixed_mtrrs();
} }
void x86_setup_fixed_mtrrs(void) static void x86_setup_fixed_mtrrs(void)
{ {
x86_setup_fixed_mtrrs_no_enable(); x86_setup_fixed_mtrrs_no_enable();

View File

@ -95,9 +95,7 @@ void enable_fixed_mtrr(void);
void fixed_mtrrs_expose_amd_rwdram(void); void fixed_mtrrs_expose_amd_rwdram(void);
/* Hide Rd/WrDram bits and allow modification for AMD. */ /* Hide Rd/WrDram bits and allow modification for AMD. */
void fixed_mtrrs_hide_amd_rwdram(void); void fixed_mtrrs_hide_amd_rwdram(void);
void x86_setup_fixed_mtrrs(void);
/* Set up fixed MTRRs but do not enable them. */
void x86_setup_fixed_mtrrs_no_enable(void);
void x86_mtrr_check(void); void x86_mtrr_check(void);
/* Insert a temporary MTRR range for the duration of coreboot's runtime. /* Insert a temporary MTRR range for the duration of coreboot's runtime.