kern/130724: cpuinfo in linprocfs is dated, causing certain programs dependent on not reported instructions to not run.

Sabeeh Baig baigsabeeh at gmail.com
Sun Jan 18 18:00:11 PST 2009


>Number:         130724
>Category:       kern
>Synopsis:       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-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 19 02:00:09 UTC 2009
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list