aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/amd64_mem.c7
-rw-r--r--sys/i386/i386/i686_mem.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/amd64/amd64/amd64_mem.c b/sys/amd64/amd64/amd64_mem.c
index 4be3d13dd7a8..90b72b4fcecd 100644
--- a/sys/amd64/amd64/amd64_mem.c
+++ b/sys/amd64/amd64/amd64_mem.c
@@ -575,9 +575,10 @@ static void
i686_mem_drvinit(void *unused)
{
/* Try for i686 MTRRs */
- if (!strcmp(cpu_vendor, "GenuineIntel") &&
- cpu_feature & CPUID_MTRR &&
- (cpu_id & 0xf00) == 0x600) {
+ if ((cpu_feature & CPUID_MTRR) &&
+ ((cpu_id & 0xf00) == 0x600) &&
+ ((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
+ (strcmp(cpu_vendor, "AuthenticAMD") == 0))) {
mem_range_softc.mr_op = &i686_mrops;
}
}
diff --git a/sys/i386/i386/i686_mem.c b/sys/i386/i386/i686_mem.c
index 4be3d13dd7a8..90b72b4fcecd 100644
--- a/sys/i386/i386/i686_mem.c
+++ b/sys/i386/i386/i686_mem.c
@@ -575,9 +575,10 @@ static void
i686_mem_drvinit(void *unused)
{
/* Try for i686 MTRRs */
- if (!strcmp(cpu_vendor, "GenuineIntel") &&
- cpu_feature & CPUID_MTRR &&
- (cpu_id & 0xf00) == 0x600) {
+ if ((cpu_feature & CPUID_MTRR) &&
+ ((cpu_id & 0xf00) == 0x600) &&
+ ((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
+ (strcmp(cpu_vendor, "AuthenticAMD") == 0))) {
mem_range_softc.mr_op = &i686_mrops;
}
}