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 00aaffaf47
.
Change-Id: Ib77a0f52228cd2f19f3227824f704ac690be4aba
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64803
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
4ed2260136
commit
29aa1e1567
|
@ -861,11 +861,6 @@ void x86_mtrr_check(void)
|
||||||
|
|
||||||
static bool put_back_original_solution;
|
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)
|
void mtrr_use_temp_range(uintptr_t begin, size_t size, int type)
|
||||||
{
|
{
|
||||||
const struct range_entry *r;
|
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)begin, (long long)begin + size - 1,
|
||||||
(long long)size, type);
|
(long long)size, type);
|
||||||
else
|
else
|
||||||
need_restore_mtrr();
|
put_back_original_solution = true;
|
||||||
|
|
||||||
memranges_teardown(&addr_space);
|
memranges_teardown(&addr_space);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,6 @@ void x86_setup_fixed_mtrrs(void);
|
||||||
/* Set up fixed MTRRs but do not enable them. */
|
/* Set up fixed MTRRs but do not enable them. */
|
||||||
void x86_setup_fixed_mtrrs_no_enable(void);
|
void x86_setup_fixed_mtrrs_no_enable(void);
|
||||||
void x86_mtrr_check(void);
|
void x86_mtrr_check(void);
|
||||||
void need_restore_mtrr(void);
|
|
||||||
|
|
||||||
/* Insert a temporary MTRR range for the duration of coreboot's runtime.
|
/* 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. */
|
* This function needs to be called after the first MTRR solution is derived. */
|
||||||
|
|
Loading…
Reference in New Issue