X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fmtrr.c;h=ec3be4f3aa66fcf76eed22183ab87ce30ed92dbe;hb=9eb210023718c65a1300cb0b768ba478b0a2b211;hp=ed239c81b1489b79f0b97709f8f1c6771dcb4623;hpb=9a8609f862b89efbb52106a94ad51f55bb67e05a;p=seabios.git diff --git a/src/mtrr.c b/src/mtrr.c index ed239c8..ec3be4f 100644 --- a/src/mtrr.c +++ b/src/mtrr.c @@ -6,6 +6,7 @@ #include "util.h" // dprintf #include "biosvar.h" // GET_EBDA +#include "xen.h" // usingXen #define MSR_MTRRcap 0x000000fe #define MSR_MTRRfix64K_00000 0x00000250 @@ -32,7 +33,7 @@ void mtrr_setup(void) { - if (CONFIG_COREBOOT) + if (!CONFIG_MTRR_INIT || CONFIG_COREBOOT || usingXen()) return; u32 eax, ebx, ecx, edx, cpuid_features; @@ -83,9 +84,9 @@ void mtrr_setup(void) int phys_bits = 36; cpuid(0x80000000u, &eax, &ebx, &ecx, &edx); if (eax >= 0x80000008) { - /* Get physical bits from leaf 0x80000008 (if available) */ - cpuid(0x80000008u, &eax, &ebx, &ecx, &edx); - phys_bits = eax & 0xff; + /* Get physical bits from leaf 0x80000008 (if available) */ + cpuid(0x80000008u, &eax, &ebx, &ecx, &edx); + phys_bits = eax & 0xff; } u64 phys_mask = ((1ull << phys_bits) - 1); for (i=0; i