Module Name:    src
Committed By:   sborrill
Date:           Thu Dec  3 14:47:15 UTC 2009

Modified Files:
        src/sys/arch/x86/x86: intel_busclock.c

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/intel_busclock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/intel_busclock.c
diff -u src/sys/arch/x86/x86/intel_busclock.c:1.8 src/sys/arch/x86/x86/intel_busclock.c:1.9
--- src/sys/arch/x86/x86/intel_busclock.c:1.8	Fri Oct  2 15:05:42 2009
+++ src/sys/arch/x86/x86/intel_busclock.c	Thu Dec  3 14:47:15 2009
@@ -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;

Reply via email to