summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/mtrr.c13
-rw-r--r--sys/arch/i386/i386/mtrr.c11
2 files changed, 13 insertions, 11 deletions
diff --git a/sys/arch/amd64/amd64/mtrr.c b/sys/arch/amd64/amd64/mtrr.c
index 32048871538..ed6907843d1 100644
--- a/sys/arch/amd64/amd64/mtrr.c
+++ b/sys/arch/amd64/amd64/mtrr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtrr.c,v 1.1 2008/06/11 09:22:38 phessler Exp $ */
+/* $OpenBSD: mtrr.c,v 1.2 2009/06/01 20:46:50 phessler Exp $ */
/*-
* Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
* Copyright (c) 1999 Brian Fundakowski Feldman
@@ -50,13 +50,14 @@ mtrrattach(int num)
step = (cpu_id >> 0) & 0xf;
/* Try for i686 MTRRs */
- if ((cpu_feature & CPUID_MTRR) &&
- (family == 0x6 || family == 0xf) &&
- ((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
- (strcmp(cpu_vendor, "AuthenticAMD") == 0))) {
+ if (((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
+ (strcmp(cpu_vendor, "CentaurHauls") == 0) ||
+ (strcmp(cpu_vendor, "AuthenticAMD") == 0)) &&
+ (family == 0x6 || family == 0xf) &&
+ cpu_feature & CPUID_MTRR) {
mem_range_softc.mr_op = &amd64_mrops;
-
}
+
/* Initialise memory range handling */
if (mem_range_softc.mr_op != NULL)
mem_range_softc.mr_op->init(&mem_range_softc);
diff --git a/sys/arch/i386/i386/mtrr.c b/sys/arch/i386/i386/mtrr.c
index 04ee89e9f1e..c5358a0970b 100644
--- a/sys/arch/i386/i386/mtrr.c
+++ b/sys/arch/i386/i386/mtrr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtrr.c,v 1.10 2007/05/02 18:52:17 matthieu Exp $ */
+/* $OpenBSD: mtrr.c,v 1.11 2009/06/01 20:46:50 phessler Exp $ */
/*-
* Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
* Copyright (c) 1999 Brian Fundakowski Feldman
@@ -58,10 +58,11 @@ mtrrattach(int num)
mem_range_softc.mr_op = &k6_mrops;
/* Try for i686 MTRRs */
- } else if ((cpu_feature & CPUID_MTRR) &&
- (family == 0x6 || family == 0xf) &&
- ((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
- (strcmp(cpu_vendor, "AuthenticAMD") == 0))) {
+ } else if (((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
+ (strcmp(cpu_vendor, "CentaurHauls") == 0) ||
+ (strcmp(cpu_vendor, "AuthenticAMD") == 0)) &&
+ (family == 0x6 || family == 0xf) &&
+ (cpu_feature & CPUID_MTRR)) {
mem_range_softc.mr_op = &i686_mrops;
}