[PATCH 06/38] x86: Set high bits of the mtrr base registrer

Simon Glass sjg at chromium.org
Thu Mar 30 23:31:55 CEST 2023


Linux expects all the high bits to be set, not just those needed for the
CPU. Ignore the number of CPU bits and set them all.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/x86/cpu/mtrr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 1b5f24aab317..bde8481a41c8 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -73,7 +73,6 @@ static void set_var_mtrr(uint reg, uint type, uint64_t start, uint64_t size)
 
 	wrmsrl(MTRR_PHYS_BASE_MSR(reg), start | type);
 	mask = ~(size - 1);
-	mask &= (1ULL << CONFIG_CPU_ADDR_BITS) - 1;
 	wrmsrl(MTRR_PHYS_MASK_MSR(reg), mask | MTRR_PHYS_MASK_VALID);
 }
 
-- 
2.40.0.348.gf938b09366-goog



More information about the U-Boot mailing list