Kane Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63485 )
Change subject: cpu/x86: Add function to set put_back_original_solution ......................................................................
cpu/x86: Add function to set put_back_original_solution
put_back_original_solution flag in mtrr.c is static, but there is a need to set put_back_original_solution outside of mtrr.c in order to let remove_temp_solution work.
Change-Id: Ic6b5683b2aa7398a5e141f710394ab772e9775e7 Signed-off-by: Kane Chen kane.chen@intel.corp-partner.google.com --- M src/cpu/x86/mtrr/mtrr.c M src/include/cpu/x86/mtrr.h 2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/63485/1
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index 89cac7f..18ab7fa 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -908,6 +908,11 @@ memranges_teardown(&addr_space); }
+void need_restore_mtrr(void) +{ + put_back_original_solution = true; +} + static void remove_temp_solution(void *unused) { if (put_back_original_solution) diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index b8d1517..5a23784 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -96,6 +96,7 @@ /* Set up fixed MTRRs but do not enable them. */ void x86_setup_fixed_mtrrs_no_enable(void); void x86_mtrr_check(void); +void need_restore_mtrr(void);
/* Insert a temporary MTRR range for the duration of coreboot's runtime. * This function needs to be called after the first MTRR solution is derived. */