From nobody@FreeBSD.org  Mon Jan 19 01:55:13 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A52B610656E7
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 19 Jan 2009 01:55:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 9322D8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 19 Jan 2009 01:55:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J1tDU5016182
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 19 Jan 2009 01:55:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n0J1tDXM016181;
	Mon, 19 Jan 2009 01:55:13 GMT
	(envelope-from nobody)
Message-Id: <200901190155.n0J1tDXM016181@www.freebsd.org>
Date: Mon, 19 Jan 2009 01:55:13 GMT
From: Sabeeh Baig <baigsabeeh@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: cpuinfo in linprocfs is dated, causing certain programs dependent on not reported instructions to not run.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130724
>Category:       kern
>Synopsis:       [linprocfs] [patch] cpuinfo in linprocfs is dated, causing certain programs dependent on not reported instructions to not run.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-emulation
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 19 02:00:09 UTC 2009
>Closed-Date:    Sun Mar 14 13:34:06 UTC 2010
>Last-Modified:  Sun Mar 14 13:40:00 UTC 2010
>Originator:     Sabeeh Baig
>Release:        7.1
>Organization:
>Environment:
FreeBSD starbox.home 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Wed Jan 14 23:27:41 EST 2009     root@starbox.home:/usr/obj/usr/src/sys/STARBOX_KERNEL  i386


>Description:
I wanted to run Bibble Pro, which is available for Linux and Windows, on FreeBSD.  The installation of the program on FreeBSD was fairly standard, but upon running it, Bibble would quit saying that it requires SSE to run.  Running cat /usr/compat/linux/proc/cpuinfo showed that SSE and SSE2 and SSE3 were not reported, which my CPU has support for.  Looking at the source code confirmed that cpuinfo is indeed static and reports set values for each CPU without checking.  I was able to add entires for SSE and SSE2 to linprocfs.c, but this doesn't seem like a proper solution.  (I've included the patch.)  Why was cpuinfo in linprocfs implemented with static values?  Checking for proper values seems like the better idea, no?  I'd be willing to work on it.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- linprocfs.old.c	2009-01-18 16:52:34.000000000 -0500
+++ linprocfs.c	2009-01-18 17:04:04.000000000 -0500
@@ -222,7 +222,7 @@
 		"cmov",	    "pat",     "pse36",	   "pn",       "b19",
 		"b20",	    "b21",     "mmxext",   "mmx",      "fxsr",
 		"xmm",	    "b26",     "b27",	   "b28",      "b29",
-		"3dnowext", "3dnow"
+		"3dnowext", "3dnow",   "sse",      "sse2"
 	};
 
 	switch (cpu_class) {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-emulation 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 19 08:05:57 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130724 
State-Changed-From-To: open->closed 
State-Changed-By: gavin 
State-Changed-When: Sun Mar 14 13:33:00 UTC 2010 
State-Changed-Why:  
This is fixed in head (r183385) and merged to stable/7. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130724 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/130724: commit references a PR
Date: Sun, 14 Mar 2010 13:32:59 +0000 (UTC)

 Author: gavin
 Date: Sun Mar 14 13:32:40 2010
 New Revision: 205152
 URL: http://svn.freebsd.org/changeset/base/205152
 
 Log:
   Merge r183385 from head (by cognet)
   
     Advertise bit 26 as sse2.
   
   PR:		kern/130724
   Approved by:	cognet
 
 Modified:
   stable/7/sys/compat/linprocfs/linprocfs.c
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/compat/linprocfs/linprocfs.c
 ==============================================================================
 --- stable/7/sys/compat/linprocfs/linprocfs.c	Sun Mar 14 13:29:09 2010	(r205151)
 +++ stable/7/sys/compat/linprocfs/linprocfs.c	Sun Mar 14 13:32:40 2010	(r205152)
 @@ -222,7 +222,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS)
  		"sep",	    "sep",     "mtrr",	   "pge",      "mca",
  		"cmov",	    "pat",     "pse36",	   "pn",       "b19",
  		"b20",	    "b21",     "mmxext",   "mmx",      "fxsr",
 -		"xmm",	    "b26",     "b27",	   "b28",      "b29",
 +		"xmm",	    "sse2",    "b27",	   "b28",      "b29",
  		"3dnowext", "3dnow"
  	};
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
