diff options
author | Subrata Banik <subratabanik@google.com> | 2022-04-08 13:25:49 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-04-13 21:28:31 +0000 |
commit | 3e4e4abb61cab420eaad1f59b1e24d2b30b77125 (patch) | |
tree | e13af1553bd42c5c78f3890134b783e2adf8bcc5 /src/cpu | |
parent | 00aaffaf470adfbaa0fbfa0ec3cc67311763810b (diff) |
cpu/x86/mtrr: Use `need_restore_mtrr` to set put_back_original_solution
This patch calls into need_restore_mtrr() from the mtrr_use_temp_range
function to set `put_back_original_solution` to discard any temporary
MTRR range prior to boot to payload.
BUG=b:225766934
TEST=Able to build and boot google/brya to verify that
`remove_temp_solution()` is able to discard any temporary MTRR range
before booting to payload.
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I2e00ec593847e1eb173d5ac77b15b50342860f89
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63491
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/x86/mtrr/mtrr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index e1bdf4546a..288f06dd0e 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -908,7 +908,7 @@ void mtrr_use_temp_range(uintptr_t begin, size_t size, int type) (long long)begin, (long long)begin + size, (long long)size, type); else - put_back_original_solution = true; + need_restore_mtrr(); memranges_teardown(&addr_space); } |