summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-06-25 01:22:17 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-06-30 17:55:16 +0200
commit599cda82283294944883cb17e8c2a43d96f9d2e9 (patch)
treed9552a757b9957807f4dafe09295a1fbbf393cc2
parent2c342f508065db05f31ac04a9dee934759d7c039 (diff)
Use MTRR defines
Change-Id: I60ae6dcb8c3b280fe74f27f4d61de70cc1ba190b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6123 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
-rw-r--r--src/cpu/x86/mtrr/mtrr.c7
1 files 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");