From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 19 02:00:10 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F0D1065675 for ; Mon, 19 Jan 2009 02:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 95C638FC19 for ; Mon, 19 Jan 2009 02:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J20AOP009396 for ; Mon, 19 Jan 2009 02:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n0J20A6r009395; Mon, 19 Jan 2009 02:00:10 GMT (envelope-from gnats) Resent-Date: Mon, 19 Jan 2009 02:00:10 GMT Resent-Message-Id: <200901190200.n0J20A6r009395@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sabeeh Baig Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A52B610656E7 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/130724: cpuinfo in linprocfs is dated, causing certain programs dependent on not reported instructions to not run. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 02:00:11 -0000 >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@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: