From owner-freebsd-ppc@FreeBSD.ORG Sun Apr 19 04:28:38 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 C02A4106566B for ; Sun, 19 Apr 2009 04:28:38 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id 947BE8FC12 for ; Sun, 19 Apr 2009 04:28:38 +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.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) id <0KIB00G00Z3QTW00@smtpauth2.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Sat, 18 Apr 2009 23:28:38 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.201.152.222]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) with ESMTPSA id <0KIB00BGUZ3M0L20@smtpauth2.wiscmail.wisc.edu>; Sat, 18 Apr 2009 23:28:35 -0500 (CDT) Date: Sat, 18 Apr 2009 23:28:34 -0500 From: Nathan Whitehorn In-reply-to: <49EA4547.8010508@freebsd.org> To: Andreas Tobler Message-id: <49EAA872.9010505@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.19.30721, SenderIP=76.201.152.222 References: <49EA2A57.1040100@fgznet.ch> <49EA4547.8010508@freebsd.org> 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: Sun, 19 Apr 2009 04:28:39 -0000 Nathan Whitehorn wrote: > 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. I managed to reproduce this. There's something weird going on that I'll look into. Thanks for investigating! -Nathan