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>
This commit is contained in:
Kyösti Mälkki 2014-06-25 01:22:17 +03:00
parent 2c342f5080
commit 599cda8228
1 changed files with 3 additions and 4 deletions

View File

@ -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");