From 29aa1e156771c7e24cefa52077f8de30f56b9d5d Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 30 May 2022 18:51:45 +0200 Subject: Revert "cpu/x86: Add function to set `put_back_original_solution` variable" Now that mtrr_use_temp_range() can deal with multiple ranges there is no need to expose this to restore the MTRR solution. This reverts commit 00aaffaf470adfbaa0fbfa0ec3cc67311763810b. Change-Id: Ib77a0f52228cd2f19f3227824f704ac690be4aba Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/64803 Reviewed-by: Subrata Banik Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) --- src/cpu/x86/mtrr/mtrr.c | 7 +------ src/include/cpu/x86/mtrr.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index d1098d988f..6d4aa5730b 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -861,11 +861,6 @@ void x86_mtrr_check(void) static bool put_back_original_solution; -void need_restore_mtrr(void) -{ - put_back_original_solution = true; -} - void mtrr_use_temp_range(uintptr_t begin, size_t size, int type) { const struct range_entry *r; @@ -935,7 +930,7 @@ void mtrr_use_temp_range(uintptr_t begin, size_t size, int type) (long long)begin, (long long)begin + size - 1, (long long)size, type); else - need_restore_mtrr(); + put_back_original_solution = true; memranges_teardown(&addr_space); } diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 5397d33948..b2bc2c86b1 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -96,7 +96,6 @@ 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 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. */ -- cgit v1.2.3