Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34753 )
Change subject: soc/intel/{cnl, icl}: Set CONFIG_CPU_ADDR_BITS to 39 ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34753/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/34753/3//COMMIT_MSG@14 PS3, Line 14: Also this change helps to generate correct MTRR mask value while : using set_var_mtrr
should be yes, i was actually using set_var_mtrr as many places in common code block we are using se […]
I was referring to basically something like this:
diff --git a/src/cpu/x86/mtrr/earlymtrr.c b/src/cpu/x86/mtrr/earlymtrr.c index 02ad85f321..5d7ff2cf45 100644 --- a/src/cpu/x86/mtrr/earlymtrr.c +++ b/src/cpu/x86/mtrr/earlymtrr.c @@ -11,6 +11,7 @@ * GNU General Public License for more details. */
+#include <cpu/cpu.h> #include <cpu/x86/cache.h> #include <cpu/x86/mtrr.h> #include <cpu/x86/msr.h> @@ -51,6 +52,6 @@ void set_var_mtrr( basem.hi = 0; wrmsr(MTRR_PHYS_BASE(reg), basem); maskm.lo = ~(size - 1) | MTRR_PHYS_MASK_VALID; - maskm.hi = (1 << (CONFIG_CPU_ADDR_BITS - 32)) - 1; + maskm.hi = (1 << (cpu_phys_address_size() - 32)) - 1; wrmsr(MTRR_PHYS_MASK(reg), maskm); }