From owner-freebsd-ppc@FreeBSD.ORG Sat Apr 18 21:25:44 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E8CB106568D for ; Sat, 18 Apr 2009 21:25:44 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 023CE8FC20 for ; Sat, 18 Apr 2009 21:25:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) id <0KIB00B00FIO9E00@smtpauth3.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Sat, 18 Apr 2009 16:25:36 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.201.152.222]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) with ESMTPSA id <0KIB005GJFIFFI70@smtpauth3.wiscmail.wisc.edu>; Sat, 18 Apr 2009 16:25:33 -0500 (CDT) Date: Sat, 18 Apr 2009 16:25:27 -0500 From: Nathan Whitehorn In-reply-to: <49EA2A57.1040100@fgznet.ch> To: Andreas Tobler Message-id: <49EA4547.8010508@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.201.152.222 X-Spam-PmxInfo: Server=avs-11, Version=5.5.1.360522, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.4.18.200551, SenderIP=76.201.152.222 References: <49EA2A57.1040100@fgznet.ch> User-Agent: Thunderbird 2.0.0.21 (X11/20090405) Cc: FreeBSD PowerPC ML Subject: Re: X11 CURRENT and non-altivec based macs X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2009 21:25:44 -0000 Andreas Tobler wrote: > Hi all, > > I discovered a nasty issue which hits all non-altivec based ppc > systems, mostly G3, there are some 7400 w/o altivec, which want to use > X11. > > When you upgraded to -CURRENT and latest Xorg stuff including > pixman-0.15.2 you'll hit a coredump when starting X with a > recent/decent wm. > > Analyzing the coredump of Xorg led me to this: > > #0 0x21b9e494 in pixman_have_vmx () from > /usr/local/lib/libpixman-1.so.9 Cannot find new threads: generic error > > A closer look into the build of pixman showed me that it was built > with altivec support. No go on my G3. > > I helped myself with the below patch in the ports Makefile. But I do > not know if the other ppc users 'have' real working Altivec support. > We have Altivec support since a few moons in the kernel. Thanks Nathan! > I know we build the kernel w/o Altivec. How do we want to build user > applications/packages? Also w/o altivec or with? > > We can either adjust the ports Makefile or try to fixup the pixman > sources. They are currently 'fixed' for apple and linux only. Fixed in > terms of runtime detection of Altivec capability. (see > pixman/pixman-pict.c) > > Do we have already a sysctl telling us we have altivec, I do not see > such a sysctl? > > Suggestions? > In case of disabling vmx on all ppc based systems, who do I need to > ping, x11@freebsd.org? Could you provide some more information than this (versions of X11, pixman and name/version of the window manager)? I just tested the non-Apple/non-Linux VMX detection code in pixman and it appears to work properly. Providing a sysctl turned out to be problematic since PowerPC CPUs, unlike x86, do not provide a features mask. You either have to have a table of CPUs and capabilities, or try the instructions you want to know about and see if you get SIGILL. We could do this in the kernel and provide a sysctl, but you can do the more-portable SIGILL just as easily from userspace, and this is what pixman currently does. -Nathan