From 581c42807d358a66c2a4b3680d465a7069feb2f4 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 19 Apr 2016 15:49:23 -0700 Subject: soc/intel/apollolake: Set default memory type to uncacheable Set the default memory type in MTRRCap register to 0. This ensures that even if the MTRR Enable bit is set in MTRRCap register, the default memory type is still uncacheable. Change-Id: I63e7993f8b65dabbab60e7c1bb8d6d89ef4da9ee Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/14428 Tested-by: build bot (Jenkins) Reviewed-by: Andrey Petrov --- src/soc/intel/apollolake/bootblock/cache_as_ram.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/soc/intel/apollolake/bootblock/cache_as_ram.S b/src/soc/intel/apollolake/bootblock/cache_as_ram.S index 9d2bba01e8..cd301ac5e9 100644 --- a/src/soc/intel/apollolake/bootblock/cache_as_ram.S +++ b/src/soc/intel/apollolake/bootblock/cache_as_ram.S @@ -63,7 +63,9 @@ clear_var_mtrr: /* Configure default memory type to uncacheable (UC) */ mov $MTRR_DEF_TYPE_MSR, %ecx rdmsr - and $MTRR_DEF_TYPE_MASK, %eax + /* Clear enable bits and set default type to UC. */ + and $~(MTRR_DEF_TYPE_MASK | MTRR_DEF_TYPE_EN | \ + MTRR_DEF_TYPE_FIX_EN), %eax wrmsr post_code(0x24) -- cgit v1.2.3