Module Name:    src
Committed By:   snj
Date:           Fri Dec 18 05:55:23 UTC 2009

Modified Files:
        src/sys/arch/x86/x86 [netbsd-5]: intel_busclock.c

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1181):
        sys/arch/x86/x86/intel_busclock.c: revision 1.9
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.5.10.2 -r1.5.10.3 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.5.10.2 src/sys/arch/x86/x86/intel_busclock.c:1.5.10.3
--- src/sys/arch/x86/x86/intel_busclock.c:1.5.10.2	Mon Oct  5 10:34:07 2009
+++ src/sys/arch/x86/x86/intel_busclock.c	Fri Dec 18 05:55:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_busclock.c,v 1.5.10.2 2009/10/05 10:34:07 sborrill Exp $	*/
+/*	$NetBSD: intel_busclock.c,v 1.5.10.3 2009/12/18 05:55:23 snj 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.5.10.2 2009/10/05 10:34:07 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.5.10.3 2009/12/18 05:55:23 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -126,6 +126,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