Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Interim workaround for modern Xeons that do...
details: https://anonhg.NetBSD.org/src/rev/33f39b88fc25
branches: trunk
changeset: 749594:33f39b88fc25
user: sborrill <sborrill%NetBSD.org@localhost>
date: Thu Dec 03 14:47:15 2009 +0000
description:
Interim workaround for modern Xeons that don't have the simplistic view of
bus speed and therefore do not support MSR_FSB_FREQ (e.g. X3400). In the
long-term, ACPI should be used for this (c.f. FreeBSD).
diffstat:
sys/arch/x86/x86/intel_busclock.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 2d4c6b4ec2f3 -r 33f39b88fc25 sys/arch/x86/x86/intel_busclock.c
--- a/sys/arch/x86/x86/intel_busclock.c Thu Dec 03 14:44:12 2009 +0000
+++ b/sys/arch/x86/x86/intel_busclock.c Thu Dec 03 14:47:15 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_busclock.c,v 1.8 2009/10/02 15:05:42 jmcneill Exp $ */
+/* $NetBSD: intel_busclock.c,v 1.9 2009/12/03 14:47:15 sborrill Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.8 2009/10/02 15:05:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.9 2009/12/03 14:47:15 sborrill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -127,6 +127,18 @@
}
break;
case 0xe: /* Core Duo/Solo */
+ /*
+ * XXX
+ * Newer CPUs will GP when attemping to access MSR_FSB_FREQ.
+ * In the long-term, use ACPI instead of all this.
+ */
+ switch (CPUID2EXTMODEL(ci->ci_signature)) {
+ case 0x1:
+ aprint_debug("%s: unable to determine bus speed",
+ device_xname(ci->ci_dev));
+ goto print_msr;
+ }
+ /* FALLTHROUGH */
case 0xf: /* Core Xeon */
msr = rdmsr(MSR_FSB_FREQ);
bus = (msr >> 0) & 0x7;
Home |
Main Index |
Thread Index |
Old Index