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>
This commit is contained in:
Subrata Banik 2022-04-08 13:25:49 +05:30 committed by Felix Held
parent 00aaffaf47
commit 3e4e4abb61
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}