From 599cda82283294944883cb17e8c2a43d96f9d2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 25 Jun 2014 01:22:17 +0300 Subject: Use MTRR defines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I60ae6dcb8c3b280fe74f27f4d61de70cc1ba190b Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/6123 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi Reviewed-by: Edward O'Callaghan --- src/cpu/x86/mtrr/mtrr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index 86e31d0010..8826535528 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -778,17 +778,16 @@ int x86_mtrr_check(void) msr_t msr; printk(BIOS_DEBUG, "\nMTRR check\n"); - msr = rdmsr(0x2ff); - msr.lo >>= 10; + msr = rdmsr(MTRRdefType_MSR); printk(BIOS_DEBUG, "Fixed MTRRs : "); - if (msr.lo & 0x01) + if (msr.lo & MTRRdefTypeFixEn) printk(BIOS_DEBUG, "Enabled\n"); else printk(BIOS_DEBUG, "Disabled\n"); printk(BIOS_DEBUG, "Variable MTRRs: "); - if (msr.lo & 0x02) + if (msr.lo & MTRRdefTypeEn) printk(BIOS_DEBUG, "Enabled\n"); else printk(BIOS_DEBUG, "Disabled\n"); -- cgit v1.2.3