From mike@jellydonut.org  Wed Jan 23 05:27:15 2008
Return-Path: <mike@jellydonut.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 013E516A418
	for <freebsd-gnats-submit@freebsd.org>; Wed, 23 Jan 2008 05:27:15 +0000 (UTC)
	(envelope-from mike@jellydonut.org)
Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.5])
	by mx1.freebsd.org (Postfix) with ESMTP id C6DDD13C46E
	for <freebsd-gnats-submit@freebsd.org>; Wed, 23 Jan 2008 05:27:14 +0000 (UTC)
	(envelope-from mike@jellydonut.org)
Received: (qmail 17066 invoked from network); 23 Jan 2008 05:00:34 -0000
Received: from marconi.jellydonut.org (HELO localhost) ([216.27.165.148])
          (envelope-sender <mike@jellydonut.org>)
          by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP
          for <freebsd-gnats-submit@freebsd.org>; 23 Jan 2008 05:00:34 -0000
Received: from socrates.localnet (192.168.0.10) by marconi.localnet
Received: from socrates.localnet (localhost.localnet [127.0.0.1])
	by socrates.localnet (8.14.2/8.14.2) with ESMTP id m0N50W34026937
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 23 Jan 2008 00:00:32 -0500 (EST)
	(envelope-from mike@socrates.localnet)
Received: (from mike@localhost)
	by socrates.localnet (8.14.2/8.14.2/Submit) id m0N50Wu0026936;
	Wed, 23 Jan 2008 00:00:32 -0500 (EST)
	(envelope-from mike)
Message-Id: <200801230500.m0N50Wu0026936@socrates.localnet>
Date: Wed, 23 Jan 2008 00:00:32 -0500 (EST)
From: Michael Proto <mike@jellydonut.org>
Reply-To: Michael Proto <mike@jellydonut.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: VIA CPU mis-detected in kernel
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         119913
>Category:       i386
>Synopsis:       VIA CPU mis-detected in kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 23 05:30:00 UTC 2008
>Closed-Date:    Sun Jan 27 00:00:10 UTC 2008
>Last-Modified:  Sun Jan 27 00:00:10 UTC 2008
>Originator:     Michael Proto
>Release:        FreeBSD 6.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD socrates.localnet 6.3-RELEASE FreeBSD 6.3-RELEASE #8: Mon Jan 21 00:42:19 EST 2008 root@socrates.localnet:/usr/obj/usr/src/sys/SOCRATES i386



>Description:
	I have a VIA Esther CPU that is not being properly detected by the
kernel.

Upon boot of GENERIC, I see the following for my CPU:

CPU: VIA/IDT Unknown (1200.01-MHz 686-class CPU)
  Origin = "CentaurHauls"  Id = 0x6d0  Stepping = 0
  Features=0xa7c9baff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,APIC,SEP,MTRR,PGE,CMOV,PAT,CLFLUSH,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE>
  Features2=0x4181<SSE3,EST,TM2,xTPR>

This should be a VIA Esther CPU. By applying the following patch the CPU is
correctly detected:

CPU: VIA C7 Esther+RNG+AES+AES-CTR+SHA1+SHA256+RSA (1200.01-MHz 686-class CPU)
  Origin = "CentaurHauls"  Id = 0x6d0  Stepping = 0
  Features=0xa7c9baff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,APIC,SEP,MTRR,PGE,CMOV,PAT,CLFLUSH,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE>
  Features2=0x4181<SSE3,EST,TM2,xTPR>

>How-To-Repeat:
	Boot GENERIC on this CPU, purchased as a soldiered-on component of
the Jetway J7F4K1G2E motherboard from e-itx.com

>Fix:

	Apply the following patch:

--- sys/i386/i386/identcpu.c.old        2008-01-04 03:44:43.000000000 -0500
+++ sys/i386/i386/identcpu.c    2008-01-01 10:34:25.000000000 -0500
@@ -564,6 +564,8 @@
                        goto via_common;
                case 0x6a0:
                        strcpy(cpu_model, "VIA C7 Esther");
+               case 0x6d0:
+                       strcpy(cpu_model, "VIA C7 Esther");
 via_common:
                        do_cpuid(0xc0000000, regs);
                        i = regs[0];



>Release-Note:
>Audit-Trail:

From: Michael Proto <mike@jellydonut.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/119913: VIA CPU mis-detected in kernel
Date: Thu, 24 Jan 2008 00:37:31 -0500

 This is very similar to the following PR:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/119491
 
 The patch listed there also works here on 6.3-RELEASE
 
 CPU: VIA C7 Esther+RNG+AES+AES-CTR+SHA1+SHA256+RSA (1200.01-MHz
 686-class CPU)
    Origin = "CentaurHauls"  Id = 0x6d0  Stepping = 0
 
 Features=0xa7c9baff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,APIC,SEP,MTRR,PGE,CMOV,PAT,CLFLUSH,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE>
    Features2=0x4181<SSE3,EST,TM2,xTPR>
 ...
 PadLock: HW support loaded for AES-CBC,SHA1,SHA256.

From: Michael Proto <mike@jellydonut.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/119913: VIA CPU mis-detected in kernel
Date: Fri, 25 Jan 2008 13:46:16 -0500

 Sorry, I meant the patch listed in this PR also works to address the
 issue in #119491 and more-completely (my patch in #119491 does not fix
 Padlock detection).
 
 Any chance to get this patch MFCed? I can confirm it works very well on
 6.3-R.

From: Michael Proto <mike@jellydonut.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/119913: VIA CPU mis-detected in kernel
Date: Fri, 25 Jan 2008 13:48:10 -0500

 Bah! I replied to the wrong PR. Please close this PR as patch in 119491
 is much more complete.
 
 Michael Proto wrote:
 > Sorry, I meant the patch listed in this PR also works to address the
 > issue in #119491 and more-completely (my patch in #119491 does not fix
 > Padlock detection).
 > 
 > Any chance to get this patch MFCed? I can confirm it works very well on
 > 6.3-R.
 > 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Jan 26 23:59:08 UTC 2008 
State-Changed-Why:  
Superseded by i386/119491. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119913 
>Unformatted:
