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 Fix calculation of the cpu family (display ...



details:   https://anonhg.NetBSD.org/src/rev/4c9911429c93
branches:  trunk
changeset: 791303:4c9911429c93
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Nov 12 16:35:57 2013 +0000

description:
Fix calculation of the cpu family (display family) in x86_cpu_topology().
More than bit 3 in cpu_family variable is checked in the function, so the
variable is assumed that it is not the base family but the display family
(base family + extended family).

diffstat:

 sys/arch/x86/x86/cpu_topology.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 139e02ec2cf8 -r 4c9911429c93 sys/arch/x86/x86/cpu_topology.c
--- a/sys/arch/x86/x86/cpu_topology.c   Tue Nov 12 16:15:54 2013 +0000
+++ b/sys/arch/x86/x86/cpu_topology.c   Tue Nov 12 16:35:57 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_topology.c,v 1.6 2010/05/29 05:53:57 rmind Exp $   */
+/*     $NetBSD: cpu_topology.c,v 1.7 2013/11/12 16:35:57 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2009 Mindaugas Rasiukevicius <rmind at NetBSD org>,
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.6 2010/05/29 05:53:57 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.7 2013/11/12 16:35:57 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/bitops.h>
@@ -58,6 +58,8 @@
 
        apic_id = ci->ci_initapicid;
        cpu_family = CPUID2FAMILY(ci->ci_signature);
+       if (cpu_family == 0xf)
+               cpu_family += CPUID2EXTFAMILY(ci->ci_signature);
 
        /* Initial values. */
        ci->ci_package_id = apic_id;



Home | Main Index | Thread Index | Old Index