diff options
author | Kane Chen <kane.chen@intel.corp-partner.google.com> | 2022-04-07 21:02:09 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-04-13 21:28:10 +0000 |
commit | 00aaffaf470adfbaa0fbfa0ec3cc67311763810b (patch) | |
tree | 6c394c7f901416a39f4b61ed55d28b673d014428 /src/cpu/x86/mtrr/mtrr.c | |
parent | 985faa873c1d43510956339363fa450dfc9d2507 (diff) |
cpu/x86: Add function to set `put_back_original_solution` variable
`put_back_original_solution` variable 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` to drop any temporary MTRRs being set
outside `mtrr_use_temp_range()`, for example: `set_var_mtrr()` function
is used to set MTRRs for the ROM caching.
BUG=b:225766934
TEST=Able to build and boot google/redrix.
Change-Id: Ic6b5683b2aa7398a5e141f710394ab772e9775e7
Signed-off-by: Kane Chen <kane.chen@intel.corp-partner.google.com>
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/cpu/x86/mtrr/mtrr.c')
-rw-r--r-- | src/cpu/x86/mtrr/mtrr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index 89cac7f82e..e1bdf4546a 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -860,6 +860,11 @@ 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; |