From owner-freebsd-ppc@FreeBSD.ORG Mon Jul 31 09:14:40 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CC8616A4DF for ; Mon, 31 Jul 2006 09:14:40 +0000 (UTC) (envelope-from matt@genesi-usa.com) Received: from mail.genesippc.com (mithrandir.softwarenexus.net [66.98.186.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5126F43D49 for ; Mon, 31 Jul 2006 09:14:40 +0000 (GMT) (envelope-from matt@genesi-usa.com) Received: from p54b0f7a9.dip.t-dialin.net ([84.176.247.169] helo=yukito) by mail.genesippc.com with esmtpa (Exim 4.62 (FreeBSD)) (envelope-from ) id 1G7TmF-000Cus-SG; Mon, 31 Jul 2006 09:09:32 +0000 From: "Matt Sealey" To: "'Marcel Moolenaar'" , Date: Mon, 31 Jul 2006 11:14:33 +0200 Organization: Genesi Message-ID: <001801c6b481$bf8f0580$99dfdfdf@bakuhatsu.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: Thread-Index: AcazSo4fYTCHTfkjQ8G3Woru+GA5JQBNm9lw Cc: Subject: RE: Definition of _ALIGNBYTES X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: matt@genesi-usa.com List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2006 09:14:40 -0000 Does FreeBSD support AltiVec usage in the kernel? If so _ALIGNBYTES may as well be 15, otherwise you would spend all your life realigning vector data if you ever wanted to use it :) Actually in all seriousness, 3 is right. If you longword align all your data, any misalignment is handled in hardware (fairly fast too). If you are trying to get some serious performance out of things you would probably want to 8-byte align your floating point values, and 16-byte align your vector values, and you can do this manually at the time you need it. Otherwise, aligning everything to a 4-byte boundary is just fine and dandy. -- Matt Sealey Manager, Genesi, Developer Relations > -----Original Message----- > From: owner-freebsd-ppc@freebsd.org > [mailto:owner-freebsd-ppc@freebsd.org] On Behalf Of Marcel Moolenaar > Sent: Saturday, July 29, 2006 10:10 PM > To: ppc@FreeBSD.org > Subject: Definition of _ALIGNBYTES > > All, > > In /usr/include/sys/param.h (or > src/sys/powerpc/include/param.h), _ALIGNBYTES is defined as > (sizeof(int) - 1), or 3. It is supposed to represent the mask > used by ALIGN() to yield an alignment suitable for all types. > The alignment of the double, long long, and long double types > is 8, which would imply that _ALIGNBYTES should be 7. All > platforms, except i386, have this "right". > > I don't know how vital this definition is, but I do know that > increasing it yields an ABI breakage (I noticed that ssh(1) > stopped working). The ABI breakage is not severe enough that > you cannot increase and decrease it without being able to do > a buildworld. > > My question: should we bump it up while powerpc is still tier 2? > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net > > > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" > From owner-freebsd-ppc@FreeBSD.ORG Mon Jul 31 11:03:33 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA82E16A4F0 for ; Mon, 31 Jul 2006 11:03:33 +0000 (UTC) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9A3C43DC5 for ; Mon, 31 Jul 2006 11:03:09 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6VB39FJ051910 for ; Mon, 31 Jul 2006 11:03:09 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6VB385P051906 for freebsd-ppc@freebsd.org; Mon, 31 Jul 2006 11:03:08 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 31 Jul 2006 11:03:08 GMT Message-Id: <200607311103.k6VB385P051906@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-ppc@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 31 Jul 2006 11:03:33 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2006/02/11] powerpc/93203ppc FreeBSD PPC Can't Write to Partitions. 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2006/04/05] powerpc/95367ppc docs for ppc release. 1 problem total. From owner-freebsd-ppc@FreeBSD.ORG Tue Aug 1 21:01:44 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C434B16A4DA for ; Tue, 1 Aug 2006 21:01:44 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FE4843D46 for ; Tue, 1 Aug 2006 21:01:43 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZU40250 (AUTH peterg@ptree32.com.au); Wed, 2 Aug 2006 07:01:41 +1000 (EST) Message-ID: <44CFC160.7000808@freebsd.org> Date: Tue, 01 Aug 2006 14:02:24 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: August 7.0 snapshot available 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: Tue, 01 Aug 2006 21:01:44 -0000 Thanks to the efforts of Marcel Moolenar, the first snapshot available for any architecture in August turns out to be PPC ! ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200608/ later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 07:48:11 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 766E916A4E1 for ; Wed, 2 Aug 2006 07:48:11 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF95743D49 for ; Wed, 2 Aug 2006 07:48:10 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k727m557021505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 00:48:09 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D0589A.4020703@FreeBSD.org> Date: Wed, 02 Aug 2006 00:47:38 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: toa@pop.agri.ch Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: FreeBSD/powerpc support for GDB 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: Wed, 02 Aug 2006 07:48:11 -0000 Hi Andreas, Some time ago you have mentioned that you had some preliminary patches to make GDB working on FreeBSD/powerpc. Is it possible to get access to those patches? Thanks! -maxim From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 15:44:28 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6008C16A4DA; Wed, 2 Aug 2006 15:44:28 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B8F043D69; Wed, 2 Aug 2006 15:44:22 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.14] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZV96608 (AUTH peterg@ptree32.com.au); Thu, 3 Aug 2006 01:44:20 +1000 (EST) Message-ID: <44D0C849.6060802@freebsd.org> Date: Wed, 02 Aug 2006 08:44:09 -0700 From: Peter Grehan User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: Maxim Sobolev References: <44D0589A.4020703@FreeBSD.org> In-Reply-To: <44D0589A.4020703@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: FreeBSD/powerpc support for GDB X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 15:44:28 -0000 Hi Maxim, > Some time ago you have mentioned that you had some preliminary patches > to make GDB working on FreeBSD/powerpc. Is it possible to get access to > those patches? I had aggregated all the GDB patches from various people and had something that's functioning (sans kgdb) on 6.0 - I can make that available and also can merge it back to -current. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 17:07:26 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39E1D16A5F2; Wed, 2 Aug 2006 17:07:26 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 513E743D68; Wed, 2 Aug 2006 17:07:24 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k72H7LJI028308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 10:07:22 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D0DBAE.2080705@FreeBSD.org> Date: Wed, 02 Aug 2006 10:06:54 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: grehan@FreeBSD.org References: <44D0589A.4020703@FreeBSD.org> <44D0C849.6060802@freebsd.org> In-Reply-To: <44D0C849.6060802@freebsd.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: FreeBSD/powerpc support for GDB 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: Wed, 02 Aug 2006 17:07:26 -0000 Peter Grehan wrote: > Hi Maxim, > >> Some time ago you have mentioned that you had some preliminary patches >> to make GDB working on FreeBSD/powerpc. Is it possible to get access >> to those patches? > > I had aggregated all the GDB patches from various people and had > something that's functioning (sans kgdb) on 6.0 - I can make that > available and also can merge it back to -current. Yes, please. Since having at least partially working debugger is much better than having no debugger at all. -Maxim From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 21:35:51 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8455716A4E2 for ; Wed, 2 Aug 2006 21:35:51 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B34243D46 for ; Wed, 2 Aug 2006 21:35:50 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.5.252] (dhcp52.wlan.xcllnt.net [192.168.5.252]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k72LZoUb018610 for ; Wed, 2 Aug 2006 14:35:50 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: ppc@FreeBSD.org From: Marcel Moolenaar Date: Wed, 2 Aug 2006 14:35:39 -0700 X-Mailer: Apple Mail (2.752.2) Cc: Subject: Power-on and remote power controllers 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: Wed, 02 Aug 2006 21:35:51 -0000 All, I typically have all my development machines on a remote power controller with serial consoles. My iMac G3 is the exception (on both accounts :-) My first concern is to have it work with the remote power controller. What this means is that if I enable the outlet on the RPC, the iMac should turn on. This does not happen yet because of the soft on/off switch. Is there a know solution or work-around for it? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 22:44:49 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.ORG Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07AB916A4E1; Wed, 2 Aug 2006 22:44:49 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 514A343D49; Wed, 2 Aug 2006 22:44:47 +0000 (GMT) (envelope-from sobomax@sippysoft.com) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k72MiiaU032478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 15:44:45 -0700 (PDT) (envelope-from sobomax@sippysoft.com) Message-ID: <44D12AC0.90009@sippysoft.com> Date: Wed, 02 Aug 2006 15:44:16 -0700 From: Maxim Sobolev Organization: Sippy Software User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: "current@freebsd.org" , freebsd-ppc@FreeBSD.ORG Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 22:44:49 -0000 Hi, Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps core with seg 11. The same csup(8) version compiled on 6.0 works just fine on the same 7-CURRENT kernel. Unfortunately lack of gdb doesn't allow to extract backtrace out of core file. Any ideas? -Maxim From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:04:07 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBC7116A4E5; Wed, 2 Aug 2006 23:04:07 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C14143D46; Wed, 2 Aug 2006 23:04:07 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.5.252] (dhcp52.wlan.xcllnt.net [192.168.5.252]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k72N46WC019080; Wed, 2 Aug 2006 16:04:06 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <44D12AC0.90009@sippysoft.com> References: <44D12AC0.90009@sippysoft.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 2 Aug 2006 16:03:55 -0700 To: Maxim Sobolev X-Mailer: Apple Mail (2.752.2) Cc: "current@freebsd.org" , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:04:07 -0000 On Aug 2, 2006, at 3:44 PM, Maxim Sobolev wrote: > Hi, > > Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) > dumps core with seg 11. The same csup(8) version compiled on 6.0 > works just fine on the same 7-CURRENT kernel. > > Unfortunately lack of gdb doesn't allow to extract backtrace out of > core file. > > Any ideas? I can't say anything about the threading bug, but I can say this: I'm working on gdb-6.5, which involves implementing debugger support for threaded applications other than i386 and amd64. I'd like it to include PowerPC support as well, but that requires some additional work because there's no PowerPC support yet. I could use some help with the ABI details. If the problem of no debugger is addressed, you will be able to look into the threading bug and maybe fix it without much pain... FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:08:12 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EFF516A4DD; Wed, 2 Aug 2006 23:08:12 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E1FC43D55; Wed, 2 Aug 2006 23:08:06 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.7/8.13.7) with ESMTP id k72N83d7043050; Wed, 2 Aug 2006 16:08:03 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.7/8.13.7/Submit) id k72N83Gt043049; Wed, 2 Aug 2006 16:08:03 -0700 (PDT) (envelope-from sgk) Date: Wed, 2 Aug 2006 16:08:03 -0700 From: Steve Kargl To: Maxim Sobolev Message-ID: <20060802230803.GA32778@troutmask.apl.washington.edu> References: <44D12AC0.90009@sippysoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D12AC0.90009@sippysoft.com> User-Agent: Mutt/1.4.2.2i Cc: "current@freebsd.org" , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:08:12 -0000 On Wed, Aug 02, 2006 at 03:44:16PM -0700, Maxim Sobolev wrote: > > Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps > core with seg 11. The same csup(8) version compiled on 6.0 works just > fine on the same 7-CURRENT kernel. > What does ldd show? -- Steve From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:23:18 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B01116A4E1; Wed, 2 Aug 2006 23:23:18 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DC7743D93; Wed, 2 Aug 2006 23:22:53 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k72NMfwP032947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 16:22:43 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D133A5.5090301@FreeBSD.org> Date: Wed, 02 Aug 2006 16:22:13 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Steve Kargl References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> In-Reply-To: <20060802230803.GA32778@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , freebsd-ppc@FreeBSD.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:23:18 -0000 Steve Kargl wrote: > On Wed, Aug 02, 2006 at 03:44:16PM -0700, Maxim Sobolev wrote: >> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps >> core with seg 11. The same csup(8) version compiled on 6.0 works just >> fine on the same 7-CURRENT kernel. >> > > What does ldd show? [sobomax@sobomac ~]$ ldd /usr/bin/csup /usr/bin/csup: libcrypto.so.5 => /lib/libcrypto.so.5 (0x2186b000) libz.so.3 => /lib/libz.so.3 (0x219d1000) libpthread.so.2 => /lib/libpthread.so.2 (0x219f4000) libc.so.7 => /lib/libc.so.7 (0x21a2b000) -Maxim From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:32:46 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.ORG Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2DEB16A58E for ; Wed, 2 Aug 2006 23:32:46 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 701B243D46 for ; Wed, 2 Aug 2006 23:32:45 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZW82791 (AUTH peterg@ptree32.com.au); Thu, 3 Aug 2006 09:32:39 +1000 (EST) Message-ID: <44D13640.4020408@freebsd.org> Date: Wed, 02 Aug 2006 16:33:20 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D12AC0.90009@sippysoft.com> In-Reply-To: <44D12AC0.90009@sippysoft.com> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.ORG Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:32:46 -0000 > Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps > core with seg 11. The same csup(8) version compiled on 6.0 works just > fine on the same 7-CURRENT kernel. ... > Any ideas? Have you tried libthr ? later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:36:57 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6281B16A4DF; Wed, 2 Aug 2006 23:36:57 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1B3643D58; Wed, 2 Aug 2006 23:36:56 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZW83428 (AUTH peterg@ptree32.com.au); Thu, 3 Aug 2006 09:36:44 +1000 (EST) Message-ID: <44D13736.6000209@freebsd.org> Date: Wed, 02 Aug 2006 16:37:26 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> In-Reply-To: <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:36:57 -0000 > I could use some help with the ABI details. Fire away Marcel. The SVR4 ppc abi is at http://www.cloudcaptech.com/MPC555%20Resources/Programming%20Environment/SVR4abippc.pdf later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:47:22 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72B0516A4DE; Wed, 2 Aug 2006 23:47:22 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7A2643D58; Wed, 2 Aug 2006 23:47:21 +0000 (GMT) (envelope-from sobomax@sippysoft.com) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k72NlIlH033265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 16:47:19 -0700 (PDT) (envelope-from sobomax@sippysoft.com) Message-ID: <44D1396A.8000801@sippysoft.com> Date: Wed, 02 Aug 2006 16:46:50 -0700 From: Maxim Sobolev Organization: Sippy Software User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Peter Grehan References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D13736.6000209@freebsd.org> In-Reply-To: <44D13736.6000209@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org, "current@freebsd.org" Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:47:22 -0000 Peter Grehan wrote: >> I could use some help with the ABI details. > > Fire away Marcel. > > The SVR4 ppc abi is at > http://www.cloudcaptech.com/MPC555%20Resources/Programming%20Environment/SVR4abippc.pdf I have committed some initial support into devel/gdb6 port. -Maxim From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:48:37 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B53916A4DA; Wed, 2 Aug 2006 23:48:37 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35D7943D49; Wed, 2 Aug 2006 23:48:37 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.5.252] (dhcp52.wlan.xcllnt.net [192.168.5.252]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k72Nma5P019435; Wed, 2 Aug 2006 16:48:36 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <44D13736.6000209@freebsd.org> References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D13736.6000209@freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <84F5F2D9-F9F9-41DF-A191-B7EEEA6B2C3A@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 2 Aug 2006 16:48:25 -0700 To: Peter Grehan X-Mailer: Apple Mail (2.752.2) Cc: "current@freebsd.org" , Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:48:37 -0000 On Aug 2, 2006, at 4:37 PM, Peter Grehan wrote: >> I could use some help with the ABI details. > > Fire away Marcel. > > The SVR4 ppc abi is at http://www.cloudcaptech.com/MPC555% > 20Resources/Programming%20Environment/SVR4abippc.pdf Thanks for the pointer, I'll take a look at it before asling questions. In general, the biggest gap in my knowledge relates to registers, how the ABI defines their use and how GDB likes to number them. Things that eventually need to be implemented: o KGDB * src/sys/powerpc/include/gdb_machdep.h * src/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c o Threading: * src/lib/libthread_db/arch/powerpc/* -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Wed Aug 2 23:57:36 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3596A16A4DF; Wed, 2 Aug 2006 23:57:36 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17AD743D69; Wed, 2 Aug 2006 23:57:26 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k72NvNlZ033377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 16:57:25 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D13BC7.8010309@FreeBSD.org> Date: Wed, 02 Aug 2006 16:56:55 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Steve Kargl References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> In-Reply-To: <20060802230803.GA32778@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , freebsd-ppc@FreeBSD.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Wed, 02 Aug 2006 23:57:36 -0000 Steve Kargl wrote: > On Wed, Aug 02, 2006 at 03:44:16PM -0700, Maxim Sobolev wrote: >> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps >> core with seg 11. The same csup(8) version compiled on 6.0 works just >> fine on the same 7-CURRENT kernel. >> > > What does ldd show? Here is the backtrace: Loaded symbols for /libexec/ld-elf.so.1 #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, offset=4294934528) at rtld.c:2663 2663 if (dtv[0] != tls_dtv_generation) { (gdb) bt #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, offset=4294934528) at rtld.c:2663 #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at /usr/src/libexec/rtld-elf/powerpc/reloc.c:577 #2 0x21ad3ef8 in choose_arena () at /usr/src/lib/libc/stdlib/malloc.c:1422 #3 0x21ad8f40 in imalloc (size=480) at /usr/src/lib/libc/stdlib/malloc.c:2662 #4 0x21ada810 in malloc (size=480) at /usr/src/lib/libc/stdlib/malloc.c:3422 #5 0x21a1ba90 in _thr_alloc (curthread=0x1a502e0) at /usr/src/lib/libpthread/thread/thr_kern.c:2369 #6 0x21a021b0 in _pthread_create (thread=0x1ab05a0, attr=0x0, start_routine=0x18109dc , arg=0x1ab0580) at /usr/src/lib/libpthread/thread/thr_create.c:110 #7 0x01810640 in mux_init (m=0x1ab0580) at /usr/src/usr.bin/csup/../../contrib/csup/mux.c:661 #8 0x0180f8b0 in mux_open (sock=3, chan=0x7fffdad8) at /usr/src/usr.bin/csup/../../contrib/csup/mux.c:328 #9 0x018146a4 in proto_mux (config=0x1a118c0) at /usr/src/usr.bin/csup/../../contrib/csup/proto.c:555 #10 0x018148f4 in proto_run (config=0x1a118c0) at /usr/src/usr.bin/csup/../../contrib/csup/proto.c:617 #11 0x0180dddc in main (argc=1, argv=0x7fffdcac) at /usr/src/usr.bin/csup/../../contrib/csup/main.c:314 (gdb) print dtv $1 = (Elf_Addr *) 0x0 (gdb) -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 03:07:49 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFC5416A4DE; Thu, 3 Aug 2006 03:07:49 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F81143D46; Thu, 3 Aug 2006 03:07:48 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZX16024 (AUTH peterg@ptree32.com.au); Thu, 3 Aug 2006 13:07:43 +1000 (EST) Message-ID: <44D168A8.1060201@freebsd.org> Date: Wed, 02 Aug 2006 20:08:24 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> In-Reply-To: <44D13BC7.8010309@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , Steve Kargl , freebsd-ppc@FreeBSD.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 03:07:50 -0000 > #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, > offset=4294934528) at rtld.c:2663 > #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at I think you might want to try point libpthread at libthr with libmap.conf. TLS is known to work for that where I don't think it works for libpthread. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 03:56:05 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C99416A5B3; Thu, 3 Aug 2006 03:56:05 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 281DF43D5C; Thu, 3 Aug 2006 03:55:56 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.5.252] (dhcp52.wlan.xcllnt.net [192.168.5.252]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k733tuUp020448; Wed, 2 Aug 2006 20:55:56 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <44D13BC7.8010309@FreeBSD.org> References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 2 Aug 2006 20:55:44 -0700 To: Maxim Sobolev X-Mailer: Apple Mail (2.752.2) Cc: "current@freebsd.org" , Steve Kargl , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 03:56:05 -0000 On Aug 2, 2006, at 4:56 PM, Maxim Sobolev wrote: > Steve Kargl wrote: >> On Wed, Aug 02, 2006 at 03:44:16PM -0700, Maxim Sobolev wrote: >>> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) >>> dumps core with seg 11. The same csup(8) version compiled on 6.0 >>> works just fine on the same 7-CURRENT kernel. >>> >> What does ldd show? > > Here is the backtrace: > > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, > offset=4294934528) at rtld.c:2663 > 2663 if (dtv[0] != tls_dtv_generation) { > (gdb) bt > #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, > offset=4294934528) at rtld.c:2663 > #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at /usr/src/ > libexec/rtld-elf/powerpc/reloc.c:577 > #2 0x21ad3ef8 in choose_arena () at /usr/src/lib/libc/stdlib/ > malloc.c:1422 > #3 0x21ad8f40 in imalloc (size=480) at /usr/src/lib/libc/stdlib/ > malloc.c:2662 > #4 0x21ada810 in malloc (size=480) at /usr/src/lib/libc/stdlib/ > malloc.c:3422 > #5 0x21a1ba90 in _thr_alloc (curthread=0x1a502e0) at /usr/src/lib/ > libpthread/thread/thr_kern.c:2369 > #6 0x21a021b0 in _pthread_create (thread=0x1ab05a0, attr=0x0, > start_routine=0x18109dc , > arg=0x1ab0580) at /usr/src/lib/libpthread/thread/thr_create.c:110 > #7 0x01810640 in mux_init (m=0x1ab0580) at /usr/src/usr.bin/ > csup/../../contrib/csup/mux.c:661 > #8 0x0180f8b0 in mux_open (sock=3, chan=0x7fffdad8) at /usr/src/ > usr.bin/csup/../../contrib/csup/mux.c:328 > #9 0x018146a4 in proto_mux (config=0x1a118c0) at /usr/src/usr.bin/ > csup/../../contrib/csup/proto.c:555 > #10 0x018148f4 in proto_run (config=0x1a118c0) at /usr/src/usr.bin/ > csup/../../contrib/csup/proto.c:617 > #11 0x0180dddc in main (argc=1, argv=0x7fffdcac) at /usr/src/ > usr.bin/csup/../../contrib/csup/main.c:314 > (gdb) print dtv > $1 = (Elf_Addr *) 0x0 > (gdb) This is probably the same bug that affects ia64. See PR ia64/91846. I think the following should work-around it: Index: malloc.c =================================================================== RCS file: /home/ncvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.132 diff -u -r1.132 malloc.c --- malloc.c 27 Jul 2006 19:09:32 -0000 1.132 +++ malloc.c 3 Aug 2006 03:55:03 -0000 @@ -279,6 +279,7 @@ # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR 4 # define USE_BRK +# define NO_TLS #endif /* sizeof(int) == (1 << SIZEOF_INT_2POW). */ FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 03:56:08 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C74E816A5AB; Thu, 3 Aug 2006 03:56:08 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id D883743D49; Thu, 3 Aug 2006 03:56:07 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k733u3Xr035953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 20:56:04 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D173B7.6040302@FreeBSD.org> Date: Wed, 02 Aug 2006 20:55:35 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Peter Grehan References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> <44D168A8.1060201@freebsd.org> In-Reply-To: <44D168A8.1060201@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , Steve Kargl , freebsd-ppc@FreeBSD.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 03:56:08 -0000 Peter Grehan wrote: >> #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, >> offset=4294934528) at rtld.c:2663 >> #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at > > I think you might want to try point libpthread at libthr with > libmap.conf. TLS is known to work for that where I don't think it works > for libpthread. But libpthread works in 6.0. What's the difference? -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 03:57:11 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 598CA16A4E1; Thu, 3 Aug 2006 03:57:11 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0470C43D49; Thu, 3 Aug 2006 03:57:10 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.5.252] (dhcp52.wlan.xcllnt.net [192.168.5.252]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k733vAaE020458; Wed, 2 Aug 2006 20:57:10 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <44D1396A.8000801@sippysoft.com> References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D13736.6000209@freebsd.org> <44D1396A.8000801@sippysoft.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 2 Aug 2006 20:56:58 -0700 To: Maxim Sobolev X-Mailer: Apple Mail (2.752.2) Cc: "current@freebsd.org" , Peter Grehan , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 03:57:11 -0000 On Aug 2, 2006, at 4:46 PM, Maxim Sobolev wrote: > Peter Grehan wrote: >>> I could use some help with the ABI details. >> Fire away Marcel. >> The SVR4 ppc abi is at http://www.cloudcaptech.com/MPC555% >> 20Resources/Programming%20Environment/SVR4abippc.pdf > > I have committed some initial support into devel/gdb6 port. Excellent! I'll take a look at it... -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 04:02:34 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95FBD16A4DD; Thu, 3 Aug 2006 04:02:34 +0000 (UTC) (envelope-from peterg@ptree32.com.au) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 388B043D46; Thu, 3 Aug 2006 04:02:32 +0000 (GMT) (envelope-from peterg@ptree32.com.au) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZX23713 (AUTH peterg@ptree32.com.au); Thu, 3 Aug 2006 14:02:28 +1000 (EST) Message-ID: <44D1757D.4010103@ptree32.com.au> Date: Wed, 02 Aug 2006 21:03:09 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> <44D168A8.1060201@freebsd.org> <44D173B7.6040302@FreeBSD.org> In-Reply-To: <44D173B7.6040302@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org, Steve Kargl , Peter Grehan , "current@freebsd.org" Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 04:02:34 -0000 > But libpthread works in 6.0. What's the difference? jemalloc. From the backtrace, t's doing a TLS allocation, where I'm certain phkmalloc didn't do anything like that. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 08:42:26 2006 Return-Path: X-Original-To: ppc@freebsd.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99CDB16A4DE for ; Thu, 3 Aug 2006 08:42:26 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (koef.zs64.net [213.238.47.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id E27AB43D4C for ; Thu, 3 Aug 2006 08:42:25 +0000 (GMT) (envelope-from stb@lassitu.de) Received: (from stb@koef.zs64.net) (authenticated) by koef.zs64.net (8.13.7/8.13.7) with ESMTP id k738gDaP035995 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Thu, 3 Aug 2006 10:42:24 +0200 (CEST) (envelope-from stb@lassitu.de) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4A1E4B8B-C848-4124-B7B8-65CBBFBE7A5F@lassitu.de> Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Thu, 3 Aug 2006 10:42:51 +0200 To: Marcel Moolenaar X-Mailer: Apple Mail (2.752.2) Cc: ppc@freebsd.org Subject: Re: Power-on and remote power controllers 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: Thu, 03 Aug 2006 08:42:26 -0000 Am 02.08.2006 um 23:35 schrieb Marcel Moolenaar: > [I]f I enable the outlet on the RPC, the iMac should turn on. This > does not happen yet because of the soft on/off switch. > > Is there a know solution or work-around for it? In Mac OS X you can set an option in System Preferences, Energy Saver, Options: "Restart automatically after a power failure". It doesn't appear to be available via nvram, so I'm not sure it can be changed from FreeBSD or OpenBoot. Stefan -- Stefan Bethke Fon +49 170 346 0140 From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 12:11:13 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A4E916A4DA; Thu, 3 Aug 2006 12:11:13 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B30843D45; Thu, 3 Aug 2006 12:11:12 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k73CBBHB007273; Thu, 3 Aug 2006 08:11:11 -0400 (EDT) Date: Thu, 3 Aug 2006 08:11:11 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Maxim Sobolev In-Reply-To: <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> Message-ID: References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: "current@freebsd.org" , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 12:11:13 -0000 On Wed, 2 Aug 2006, Marcel Moolenaar wrote: > > On Aug 2, 2006, at 3:44 PM, Maxim Sobolev wrote: > >> Hi, >> >> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps core >> with seg 11. The same csup(8) version compiled on 6.0 works just fine on >> the same 7-CURRENT kernel. AFAIK, libpthread/KSE isn't quite there yet for powerpc. -- DE From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 17:04:31 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FC0416A4DE; Thu, 3 Aug 2006 17:04:31 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A6F643D46; Thu, 3 Aug 2006 17:04:31 +0000 (GMT) (envelope-from sobomax@sippysoft.com) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73H4PEJ045006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 10:04:27 -0700 (PDT) (envelope-from sobomax@sippysoft.com) Message-ID: <44D22C7A.8030204@sippysoft.com> Date: Thu, 03 Aug 2006 10:03:54 -0700 From: Maxim Sobolev Organization: Sippy Software User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Daniel Eischen References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 17:04:31 -0000 Daniel Eischen wrote: > On Wed, 2 Aug 2006, Marcel Moolenaar wrote: > >> >> On Aug 2, 2006, at 3:44 PM, Maxim Sobolev wrote: >> >>> Hi, >>> >>> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps >>> core with seg 11. The same csup(8) version compiled on 6.0 works just >>> fine on the same 7-CURRENT kernel. > > AFAIK, libpthread/KSE isn't quite there yet for powerpc. Do you have any idea about what's wrong with it? By the way, the same problem affects ia64 too (ia64/91846) and it has been working in 6.0 just file. Looks like it has something to do with the thread-local storage. -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 17:10:22 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8164C16A4E2; Thu, 3 Aug 2006 17:10:22 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 019A243D49; Thu, 3 Aug 2006 17:10:19 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k73HAI0a028988; Thu, 3 Aug 2006 13:10:18 -0400 (EDT) Date: Thu, 3 Aug 2006 13:10:18 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Maxim Sobolev In-Reply-To: <44D22C7A.8030204@sippysoft.com> Message-ID: References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D22C7A.8030204@sippysoft.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: "current@freebsd.org" , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 17:10:22 -0000 On Thu, 3 Aug 2006, Maxim Sobolev wrote: > Daniel Eischen wrote: >> On Wed, 2 Aug 2006, Marcel Moolenaar wrote: >> >>> >>> On Aug 2, 2006, at 3:44 PM, Maxim Sobolev wrote: >>> >>>> Hi, >>>> >>>> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8) dumps >>>> core with seg 11. The same csup(8) version compiled on 6.0 works just >>>> fine on the same 7-CURRENT kernel. >> >> AFAIK, libpthread/KSE isn't quite there yet for powerpc. > > Do you have any idea about what's wrong with it? By the way, the same problem > affects ia64 too (ia64/91846) and it has been working in 6.0 just file. Looks > like it has something to do with the thread-local storage. No, I've no idea. Nothing's changed that I know of. I'm surprised that it (powerpc libpthread) works! I know some supporting MD bits were added to libpthread but never knew that they actually worked :) Has the compiler changed recently? -- DE From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:23:32 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83EF816A4DA for ; Thu, 3 Aug 2006 18:23:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16B0D43D55 for ; Thu, 3 Aug 2006 18:23:30 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73INRnq045962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 3 Aug 2006 11:23:29 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D23F02.9020709@FreeBSD.org> Date: Thu, 03 Aug 2006 11:22:58 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: freebsd-ppc@FreeBSD.org Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:23:32 -0000 Hi, I came over a problem that unaligned 64-bits access to a memory (via uint8_t or long long pointer) causes SIGBUS. Is it expected behavior or not? -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:26:53 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4976D16A4DF; Thu, 3 Aug 2006 18:26:53 +0000 (UTC) (envelope-from dje@watson.ibm.com) Received: from igw2.watson.ibm.com (igw2.watson.ibm.com [129.34.20.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D3AA43D70; Thu, 3 Aug 2006 18:26:37 +0000 (GMT) (envelope-from dje@watson.ibm.com) Received: from sp1n293en1.watson.ibm.com (sp1n293en1.watson.ibm.com [129.34.20.41]) by igw2.watson.ibm.com (8.13.1/8.13.1/8.13.1-2005-04-25 igw) with ESMTP id k73IRKhv028949; Thu, 3 Aug 2006 14:27:20 -0400 Received: from sp1n293en1.watson.ibm.com (localhost [127.0.0.1]) by sp1n293en1.watson.ibm.com (AIX5.2/8.11.6p2/8.11.7/01-14-2004_2) with ESMTP id k73IQZU146358; Thu, 3 Aug 2006 14:26:36 -0400 Received: from mgsmtp00.watson.ibm.com (mgsmtp00.watson.ibm.com [9.2.40.58]) by sp1n293en1.watson.ibm.com (AIX5.2/8.11.6p2/8.11.7/01-14-2004_1) with ESMTP id k73IQY7182652; Thu, 3 Aug 2006 14:26:35 -0400 Received: from makai.watson.ibm.com (makai.watson.ibm.com [9.2.216.144]) by mgsmtp00.watson.ibm.com (8.12.11/8.12.11/2005/09/01) with ESMTP id k73IO030022801; Thu, 3 Aug 2006 14:24:00 -0400 Received: from watson.ibm.com (localhost [127.0.0.1]) by makai.watson.ibm.com (AIX5.3/8.11.6p2/8.11.0/03-06-2002) with ESMTP id k73IQX835138; Thu, 3 Aug 2006 14:26:33 -0400 Message-Id: <200608031826.k73IQX835138@makai.watson.ibm.com> To: Maxim Sobolev In-Reply-To: Message from Maxim Sobolev of "Thu, 03 Aug 2006 11:22:58 PDT." <44D23F02.9020709@FreeBSD.org> References: <44D23F02.9020709@FreeBSD.org> Date: Thu, 03 Aug 2006 14:26:33 -0400 From: David Edelsohn Cc: freebsd-ppc@freebsd.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:26:53 -0000 >>>>> Maxim Sobolev writes: Maxim> I came over a problem that unaligned 64-bits access to a memory (via Maxim> uint8_t or long long pointer) causes SIGBUS. Is it expected behavior or not? The kernel should catch and fixup any unaligned accesses that the hardware does not allow. David From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:29:44 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A15FF16A4DF for ; Thu, 3 Aug 2006 18:29:44 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACE9543D68 for ; Thu, 3 Aug 2006 18:29:43 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73ITfGv046051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 3 Aug 2006 11:29:42 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D24075.4060607@FreeBSD.org> Date: Thu, 03 Aug 2006 11:29:09 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: freebsd-ppc@FreeBSD.org References: <44D23F02.9020709@FreeBSD.org> In-Reply-To: <44D23F02.9020709@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:29:44 -0000 Maxim Sobolev wrote: > Hi, > > I came over a problem that unaligned 64-bits access to a memory (via > uint8_t or long long pointer) causes SIGBUS. Is it expected behavior or ^^^^^^^ uint64_t I mean. -Maxim > not? > > -Maxim > From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:32:40 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4DD816A4EF; Thu, 3 Aug 2006 18:32:40 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FA1043D58; Thu, 3 Aug 2006 18:32:38 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY44875 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 04:32:33 +1000 (EST) Message-ID: <44D2416A.3070806@freebsd.org> Date: Thu, 03 Aug 2006 11:33:14 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Daniel Eischen References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D22C7A.8030204@sippysoft.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "current@freebsd.org" , Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:32:40 -0000 > No, I've no idea. Nothing's changed that I know of. I'm surprised > that it (powerpc libpthread) works! I know some supporting MD bits > were added to libpthread but never knew that they actually worked :) It only works in system scope. In theory it could work in process scope, though there's no simple way to determine if floating point regs have been used by another thread so you have to unconditionally context-switch fp state. I did a limited amount of testing, mostly with apps and the Sun 'ping-pong' thread test. I think Suleiman also ran up a bunch of larger apps with it (e.g. apache-threads). But that was in the 6.0 timeframe, and I've not seriously run up PPC for a few months now, certainly not since jemalloc went in. > Has the compiler changed recently? Nope, still at 3.4.4. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:34:46 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 076E016A4E0 for ; Thu, 3 Aug 2006 18:34:46 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC0B443D77 for ; Thu, 3 Aug 2006 18:34:39 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73IYa1m046124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 11:34:37 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D2419F.1050100@FreeBSD.org> Date: Thu, 03 Aug 2006 11:34:07 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: David Edelsohn References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> In-Reply-To: <200608031826.k73IQX835138@makai.watson.ibm.com> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:34:46 -0000 David Edelsohn wrote: >>>>>> Maxim Sobolev writes: > > Maxim> I came over a problem that unaligned 64-bits access to a memory (via > Maxim> uint8_t or long long pointer) causes SIGBUS. Is it expected behavior or not? > > The kernel should catch and fixup any unaligned accesses that the > hardware does not allow. Well, actually *nix has a long history of just killing the program with SIGBUS in such case. I am just wondering if it's really expected behavior on FreeBSD/powerpc or not. -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:52:06 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7970A16A4DF; Thu, 3 Aug 2006 18:52:06 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDA1243D68; Thu, 3 Aug 2006 18:52:03 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY50951 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 04:51:41 +1000 (EST) Message-ID: <44D245E5.4070102@freebsd.org> Date: Thu, 03 Aug 2006 11:52:21 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> In-Reply-To: <44D2419F.1050100@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:52:06 -0000 > Well, actually *nix has a long history of just killing the program with > SIGBUS in such case. > > I am just wondering if it's really expected behavior on FreeBSD/powerpc > or not. No :( What system are you running on ? I was pretty sure that G3/G4 CPUs allowed unaligned accesses unless you explicitly disabled it (except for cases such as vector ops). A 64 bit op on these CPUs should decompose into separate 32-bit accesses ala i386 so the same case should occurr for unaligned 32-bit ops. In any event, the default should be that unaligned accesses are handled, and then have switches to optionally uprintf the address, or SIGBUS. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:57:19 2006 Return-Path: X-Original-To: ppc@freebsd.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 155C816A4DD for ; Thu, 3 Aug 2006 18:57:19 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 799F443D45 for ; Thu, 3 Aug 2006 18:57:18 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY51890 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 04:56:56 +1000 (EST) Message-ID: <44D24721.1060501@freebsd.org> Date: Thu, 03 Aug 2006 11:57:37 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Stefan Bethke References: <4A1E4B8B-C848-4124-B7B8-65CBBFBE7A5F@lassitu.de> In-Reply-To: <4A1E4B8B-C848-4124-B7B8-65CBBFBE7A5F@lassitu.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@freebsd.org Subject: Re: Power-on and remote power controllers 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: Thu, 03 Aug 2006 18:57:19 -0000 > In Mac OS X you can set an option in System Preferences, Energy Saver, > Options: "Restart automatically after a power failure". It doesn't > appear to be available via nvram, so I'm not sure it can be changed > from FreeBSD or OpenBoot. To confirm, I did an nvram dump before/after modifying this setting and there was no change. I'm guessing that it results in a command to the external PMU. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:59:31 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1278516A540; Thu, 3 Aug 2006 18:59:31 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 631EA43D46; Thu, 3 Aug 2006 18:59:30 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73IxRee046401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 11:59:28 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D24772.7080109@FreeBSD.org> Date: Thu, 03 Aug 2006 11:58:58 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Peter Grehan References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> In-Reply-To: <44D245E5.4070102@freebsd.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 18:59:31 -0000 Peter Grehan wrote: >> Well, actually *nix has a long history of just killing the program >> with SIGBUS in such case. >> >> I am just wondering if it's really expected behavior on >> FreeBSD/powerpc or not. > > No :( > > What system are you running on ? I was pretty sure that G3/G4 CPUs > allowed unaligned accesses unless you explicitly disabled it (except for > cases such as vector ops). A 64 bit op on these CPUs should decompose > into separate 32-bit accesses ala i386 so the same case should occurr > for unaligned 32-bit ops. > > In any event, the default should be that unaligned accesses are > handled, and then have switches to optionally uprintf the address, or > SIGBUS. It's G4 (Mac Mini). Dmesg reports processor as: cpu0: Motorola PowerPC 7447A revision 1.2, 1250.00 MHz cpu0: HID0 8450c0bc According to the following link, unaligned floating-point 64-bits access isn't supported in the PowerPC: http://www-128.ibm.com/developerworks/library/pa-dalign/ I use the following program to reproduce the problem. It dies with "failure doing 64-bit access at address 0x7fffd8e1". #include #include #include static char *atype; static uint8_t *apoint; static void sigbus(int signum) { printf("failure doing %s-bit access at address %p\n", atype, apoint); exit(1); } int main() { uint8_t buf[1024]; uint16_t v16; uint32_t v32; uint64_t v64; static int i; signal(SIGBUS, sigbus); atype = "16"; for (i = 0; i < 256; i++) { apoint = (uint8_t *)&(buf[i]); v16 = *(uint16_t *)apoint; } atype = "32"; for (i = 0; i < 256; i++) { apoint = (uint8_t *)&(buf[i]); v32 = *(uint32_t *)apoint; } atype = "64"; for (i = 0; i < 256; i++) { apoint = (uint8_t *)&(buf[i]); v64 = *(uint64_t *)apoint; } exit(0); } -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:03:47 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9211316A4DF; Thu, 3 Aug 2006 19:03:47 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBB5443D62; Thu, 3 Aug 2006 19:03:46 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.250.2] (80-219-8-155.dclient.hispeed.ch [80.219.8.155]) by elvis.mu.org (Postfix) with ESMTP id A48C21A3C19; Thu, 3 Aug 2006 12:03:45 -0700 (PDT) Message-ID: <44D24886.1090500@FreeBSD.org> Date: Thu, 03 Aug 2006 21:03:34 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Grehan References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D22C7A.8030204@sippysoft.com> <44D2416A.3070806@freebsd.org> In-Reply-To: <44D2416A.3070806@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , "current@freebsd.org" , Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:03:47 -0000 Peter Grehan wrote: >> No, I've no idea. Nothing's changed that I know of. I'm surprised >> that it (powerpc libpthread) works! I know some supporting MD bits >> were added to libpthread but never knew that they actually worked :) > > > It only works in system scope. In theory it could work in process > scope, though there's no simple way to determine if floating point regs > have been used by another thread so you have to unconditionally > context-switch fp state. > > I did a limited amount of testing, mostly with apps and the Sun > 'ping-pong' thread test. I think Suleiman also ran up a bunch of larger > apps with it (e.g. apache-threads). I believe I only tried apache-threads with libthr. In fact, I don't think I've ever even used libpthread on powerpc.. :-( -- Suleiman From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:10:20 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B41216A4DD; Thu, 3 Aug 2006 19:10:20 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3A7743D66; Thu, 3 Aug 2006 19:10:17 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY53481 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 05:10:14 +1000 (EST) Message-ID: <44D24A3F.5080407@freebsd.org> Date: Thu, 03 Aug 2006 12:10:55 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> In-Reply-To: <44D24772.7080109@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Grehan , freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:10:20 -0000 > According to the following link, unaligned floating-point 64-bits access > isn't supported in the PowerPC: > > http://www-128.ibm.com/developerworks/library/pa-dalign/ Yep, that's right: I should have mentioned that unaligned ints are OK. Which your program demonstrates :) > atype = "64"; > for (i = 0; i < 256; i++) { > apoint = (uint8_t *)&(buf[i]); > v64 = *(uint64_t *)apoint; > } Would you be able to do a disassembly on this ? I suspect gcc is using floating-point regs to do the 64-bit loads. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:30:32 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3250616A4E0; Thu, 3 Aug 2006 19:30:32 +0000 (UTC) (envelope-from dje@watson.ibm.com) Received: from igw2.watson.ibm.com (igw2.watson.ibm.com [129.34.20.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27EE443D8F; Thu, 3 Aug 2006 19:30:00 +0000 (GMT) (envelope-from dje@watson.ibm.com) Received: from sp1n293en1.watson.ibm.com (sp1n293en1.watson.ibm.com [129.34.20.41]) by igw2.watson.ibm.com (8.13.1/8.13.1/8.13.1-2005-04-25 igw) with ESMTP id k73JUdMH012859; Thu, 3 Aug 2006 15:30:43 -0400 Received: from sp1n293en1.watson.ibm.com (localhost [127.0.0.1]) by sp1n293en1.watson.ibm.com (AIX5.2/8.11.6p2/8.11.7/01-14-2004_2) with ESMTP id k73JTsU54764; Thu, 3 Aug 2006 15:29:54 -0400 Received: from mgsmtp00.watson.ibm.com (mgsmtp00.watson.ibm.com [9.2.40.58]) by sp1n293en1.watson.ibm.com (AIX5.2/8.11.6p2/8.11.7/01-14-2004_1) with ESMTP id k73JTr7149388; Thu, 3 Aug 2006 15:29:53 -0400 Received: from makai.watson.ibm.com (makai.watson.ibm.com [9.2.216.144]) by mgsmtp00.watson.ibm.com (8.12.11/8.12.11/2005/09/01) with ESMTP id k73JRIhi020531; Thu, 3 Aug 2006 15:27:18 -0400 Received: from watson.ibm.com (localhost [127.0.0.1]) by makai.watson.ibm.com (AIX5.3/8.11.6p2/8.11.0/03-06-2002) with ESMTP id k73JTq834496; Thu, 3 Aug 2006 15:29:52 -0400 Message-Id: <200608031929.k73JTq834496@makai.watson.ibm.com> To: Peter Grehan In-Reply-To: Message from Peter Grehan of "Thu, 03 Aug 2006 12:10:55 PDT." <44D24A3F.5080407@freebsd.org> References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> Date: Thu, 03 Aug 2006 15:29:52 -0400 From: David Edelsohn Cc: Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:30:32 -0000 >>>>> Peter Grehan writes: >> atype = "64"; >> for (i = 0; i < 256; i++) { >> apoint = (uint8_t *)&(buf[i]); >> v64 = *(uint64_t *)apoint; >> } Peter> Would you be able to do a disassembly on this ? I suspect gcc is using Peter> floating-point regs to do the 64-bit loads. That does not matter. The OS is suppose to catch the misaligned load and emulate the instruction in a handler. If FreeBSD cannot handle that, then it needs to configure GCC for PowerPC in strict-alignment embedded mode, which is ABI incompatible. If FreeBSD wants to use the standard PPC SVR4 ABI or PPC32 Linux variant, it must support any misaligned load. That is the OS's responsibility, period. David From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:39:28 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7780716A4E1; Thu, 3 Aug 2006 19:39:28 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB8DA43D6B; Thu, 3 Aug 2006 19:39:23 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73JdKpc046918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 12:39:21 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D250CB.9050203@FreeBSD.org> Date: Thu, 03 Aug 2006 12:38:51 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Peter Grehan References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> In-Reply-To: <44D24A3F.5080407@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:39:28 -0000 Peter Grehan wrote: >> According to the following link, unaligned floating-point 64-bits >> access isn't supported in the PowerPC: >> >> http://www-128.ibm.com/developerworks/library/pa-dalign/ > > Yep, that's right: I should have mentioned that unaligned ints are OK. > Which your program demonstrates :) > >> atype = "64"; >> for (i = 0; i < 256; i++) { >> apoint = (uint8_t *)&(buf[i]); >> v64 = *(uint64_t *)apoint; >> } > > Would you be able to do a disassembly on this ? I suspect gcc is using > floating-point regs to do the 64-bit loads. --- test.c ---- long long test(void) { volatile long long *foo = (long long *)0x1234; return(*foo); } --- test.s --- test: stwu 1,-32(1) stw 31,28(1) mr 31,1 li 0,4660 stw 0,8(31) lwz 9,8(31) lfd 0,0(9) stfd 0,16(31) lwz 9,16(31) lwz 10,20(31) mr 3,9 mr 4,10 lwz 11,0(1) lwz 31,-4(11) mr 1,11 blr -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:44:10 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC2CE16A4E0; Thu, 3 Aug 2006 19:44:10 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B52243D5F; Thu, 3 Aug 2006 19:44:06 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY56929 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 05:43:51 +1000 (EST) Message-ID: <44D25220.6000002@freebsd.org> Date: Thu, 03 Aug 2006 12:44:32 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: David Edelsohn References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> <200608031929.k73JTq834496@makai.watson.ibm.com> In-Reply-To: <200608031929.k73JTq834496@makai.watson.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Maxim Sobolev , Peter Grehan , freebsd-ppc@freebsd.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:44:11 -0000 > Peter> Would you be able to do a disassembly on this ? I suspect gcc is using > Peter> floating-point regs to do the 64-bit loads. > > That does not matter. Agreed, I'm just trying to work out what the cause is. Yes, it will be fixed in the o/s. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:44:44 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38E6016A4DD; Thu, 3 Aug 2006 19:44:44 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 771D343D69; Thu, 3 Aug 2006 19:44:43 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY57017 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 05:44:40 +1000 (EST) Message-ID: <44D25252.9000705@freebsd.org> Date: Thu, 03 Aug 2006 12:45:22 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> <44D250CB.9050203@FreeBSD.org> In-Reply-To: <44D250CB.9050203@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:44:44 -0000 > lfd 0,0(9) > stfd 0,16(31) Yep, that's the culprit. Time to write an unaligned exception handler. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 19:46:08 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7541C16A4DD; Thu, 3 Aug 2006 19:46:08 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01DB143D5A; Thu, 3 Aug 2006 19:46:06 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY57158 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 05:46:04 +1000 (EST) Message-ID: <44D252A5.3090208@freebsd.org> Date: Thu, 03 Aug 2006 12:46:45 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Suleiman Souhlal References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D22C7A.8030204@sippysoft.com> <44D2416A.3070806@freebsd.org> <44D24886.1090500@FreeBSD.org> In-Reply-To: <44D24886.1090500@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , "current@freebsd.org" , Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Thu, 03 Aug 2006 19:46:08 -0000 > I believe I only tried apache-threads with libthr. Oh well, libpthread has had less coverage than I thought. > In fact, I don't think I've ever even used libpthread on powerpc.. :-( Maybe unintentionally :) later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 22:17:23 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBF6016A501; Thu, 3 Aug 2006 22:17:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D22543DA1; Thu, 3 Aug 2006 22:17:15 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73MHBeX048783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 15:17:13 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D275C4.5020407@FreeBSD.org> Date: Thu, 03 Aug 2006 15:16:36 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: David Edelsohn References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> <200608031929.k73JTq834496@makai.watson.ibm.com> In-Reply-To: <200608031929.k73JTq834496@makai.watson.ibm.com> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Grehan , freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 22:17:23 -0000 David Edelsohn wrote: >>>>>> Peter Grehan writes: > >>> atype = "64"; >>> for (i = 0; i < 256; i++) { >>> apoint = (uint8_t *)&(buf[i]); >>> v64 = *(uint64_t *)apoint; >>> } > > Peter> Would you be able to do a disassembly on this ? I suspect gcc is using > Peter> floating-point regs to do the 64-bit loads. > > That does not matter. The OS is suppose to catch the misaligned > load and emulate the instruction in a handler. If FreeBSD cannot handle > that, then it needs to configure GCC for PowerPC in strict-alignment > embedded mode, which is ABI incompatible. If FreeBSD wants to use the > standard PPC SVR4 ABI or PPC32 Linux variant, it must support any > misaligned load. That is the OS's responsibility, period. David, Thank you for your input. I am trying to debug this problem right now. It appears that the FreeBSD kernel already handles this condition based on the DSISR/DAR contents(trap.c, function fix_unaligned()). However, for some reason when the trap happens the DSISR is set to 0x40000000 (all bits but bit 30 are set to 0). IBM's Programming Environments Manual says the following regarding Alignment Exception in the big endian mode: Setting the DSISR and DAR as described below is optional for implementations on which alignment exceptions occur rarely, if ever, for cases that the alignment exception handler emulates. For such implementations, if the DSISR and DAR are not set as described below they are set to undefined values. Therefore, I am wondering if it's the case here. -Maxim From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 22:26:41 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCF7116A4DE; Thu, 3 Aug 2006 22:26:41 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0572143D45; Thu, 3 Aug 2006 22:26:40 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY74375 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 08:26:36 +1000 (EST) Message-ID: <44D27845.2080205@freebsd.org> Date: Thu, 03 Aug 2006 15:27:17 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> <200608031929.k73JTq834496@makai.watson.ibm.com> <44D275C4.5020407@FreeBSD.org> In-Reply-To: <44D275C4.5020407@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 22:26:41 -0000 Hi Maxim, > It appears that the FreeBSD kernel already handles this condition I can guarantee that code hasn't been tested. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 22:52:57 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9865C16A4DA; Thu, 3 Aug 2006 22:52:57 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1550743D46; Thu, 3 Aug 2006 22:52:56 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.56] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k73Mqqah049172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 15:52:55 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44D27E22.8030909@FreeBSD.org> Date: Thu, 03 Aug 2006 15:52:18 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: David Edelsohn References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> <200608031929.k73JTq834496@makai.watson.ibm.com> <44D275C4.5020407@FreeBSD.org> In-Reply-To: <44D275C4.5020407@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Grehan , freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc 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: Thu, 03 Aug 2006 22:52:57 -0000 Never mind, I have identified and fixed the problem. Thanks to everybody for help! -Maxim Maxim Sobolev wrote: > David Edelsohn wrote: >>>>>>> Peter Grehan writes: >> >>>> atype = "64"; >>>> for (i = 0; i < 256; i++) { >>>> apoint = (uint8_t *)&(buf[i]); >>>> v64 = *(uint64_t *)apoint; >>>> } >> >> Peter> Would you be able to do a disassembly on this ? I suspect gcc >> is using Peter> floating-point regs to do the 64-bit loads. >> >> That does not matter. The OS is suppose to catch the misaligned >> load and emulate the instruction in a handler. If FreeBSD cannot handle >> that, then it needs to configure GCC for PowerPC in strict-alignment >> embedded mode, which is ABI incompatible. If FreeBSD wants to use the >> standard PPC SVR4 ABI or PPC32 Linux variant, it must support any >> misaligned load. That is the OS's responsibility, period. > > David, > > Thank you for your input. I am trying to debug this problem right now. > It appears that the FreeBSD kernel already handles this condition based > on the DSISR/DAR contents(trap.c, function fix_unaligned()). However, > for some reason when the trap happens the DSISR is set to 0x40000000 > (all bits but bit 30 are set to 0). > > IBM's Programming Environments Manual says the following regarding > Alignment Exception in the big endian mode: > > > Setting the DSISR and DAR as described below is optional for > implementations on which alignment exceptions > occur rarely, if ever, for cases that the alignment exception handler > emulates. For such implementations, > if the DSISR and DAR are not set as described below they are set to > undefined values. > > > Therefore, I am wondering if it's the case here. > > -Maxim > From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 02:47:26 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 142C316A4DE; Fri, 4 Aug 2006 02:47:26 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com [24.25.9.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95F7C43D45; Fri, 4 Aug 2006 02:47:25 +0000 (GMT) (envelope-from morganw@chemikals.org) Received: from volatile.chemikals.org (cpe-024-211-118-154.sc.res.rr.com [24.211.118.154]) by ms-smtp-03.southeast.rr.com (8.13.6/8.13.6) with ESMTP id k742lNpu023612; Thu, 3 Aug 2006 22:47:23 -0400 (EDT) Received: from localhost (morganw@localhost [127.0.0.1]) by volatile.chemikals.org (8.13.6/8.13.6) with ESMTP id k742lMIk088842; Thu, 3 Aug 2006 22:47:22 -0400 (EDT) (envelope-from morganw@chemikals.org) Date: Thu, 3 Aug 2006 22:47:22 -0400 (EDT) From: Wesley Morgan To: Maxim Sobolev In-Reply-To: <44D173B7.6040302@FreeBSD.org> Message-ID: <20060803224133.R87008@volatile.chemikals.org> References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> <44D168A8.1060201@freebsd.org> <44D173B7.6040302@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Symantec AntiVirus Scan Engine Cc: Steve Kargl , "current@freebsd.org" , Peter Grehan , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Fri, 04 Aug 2006 02:47:26 -0000 On Wed, 2 Aug 2006, Maxim Sobolev wrote: > Peter Grehan wrote: >>> #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, >>> offset=4294934528) at rtld.c:2663 >>> #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at >> >> I think you might want to try point libpthread at libthr with libmap.conf. >> TLS is known to work for that where I don't think it works for libpthread. > > But libpthread works in 6.0. What's the difference? > > -Maxim FWIW, recently csup stopped working for me in -current on i386. It fails when checking the errno set after calling access() to check if a file exists: Updater failed: Cannot create directories leading to "/usr/ports/science/p5-Algorithm-SVMLight/Makefile": Unknown error: 0 According to gdb, errno is being set correctly but changes almost immediately back to zero. Not sure how/why, and I'm not sure that I'm even using gdb correctly for threaded applications. Switching to libthr with libmap.conf results in the same error. I swear that it had something to do with turning on symbol versioning, but attempting to turn it back off was not a fun experience and didn't have the patience to see it through. -- This .signature sanitized for your protection From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 18:52:14 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D224416A4DE; Fri, 4 Aug 2006 18:52:14 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A43043D53; Fri, 4 Aug 2006 18:52:13 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost.xcllnt.net [127.0.0.1]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k74IqB6e031631; Fri, 4 Aug 2006 11:52:12 -0700 (PDT) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.13.6/8.13.6/Submit) id k74IqBJU031630; Fri, 4 Aug 2006 11:52:11 -0700 (PDT) (envelope-from marcel) Date: Fri, 4 Aug 2006 11:52:11 -0700 From: Marcel Moolenaar To: Peter Grehan Message-ID: <20060804185211.GA31585@ns1.xcllnt.net> References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D13736.6000209@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D13736.6000209@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Fri, 04 Aug 2006 18:52:15 -0000 [current@ removed from the CC list] On Wed, Aug 02, 2006 at 04:37:26PM -0700, Peter Grehan wrote: > >I could use some help with the ABI details. > > Fire away Marcel. > > The SVR4 ppc abi is at > http://www.cloudcaptech.com/MPC555%20Resources/Programming%20Environment/SVR4abippc.pdf Question: struct pcb has an array called pcb_context, which is used to store non-volatile registers. The ABI tells me that general registers 13 to 31 are to be saved. FreeBSD also saves R12, according to the operands of the stmw intruction and the description of that instruction. Is this observation correct (i.e. that we also save R12 in the PCB) and is this intentional? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 19:55:50 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64DC716A4DE; Fri, 4 Aug 2006 19:55:50 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from lh.synack.net (lh.synack.net [204.152.188.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08AD643D45; Fri, 4 Aug 2006 19:55:50 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: by lh.synack.net (Postfix, from userid 100) id D4BC05E4906; Fri, 4 Aug 2006 12:55:49 -0700 (PDT) Received: from [192.168.168.201] (coeur_dalene_cuda1_id-eacb02-00-crdlid-70-36-10-195.losaca.adelphia.net [70.36.10.195]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lh.synack.net (Postfix) with ESMTP id 2CFE85E48C9; Fri, 4 Aug 2006 12:55:48 -0700 (PDT) Message-ID: <44D3A642.1000905@FreeBSD.org> Date: Fri, 04 Aug 2006 12:55:46 -0700 From: Jason Evans User-Agent: Thunderbird 1.5.0.5 (X11/20060726) MIME-Version: 1.0 To: Peter Grehan References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> <44D168A8.1060201@freebsd.org> <44D173B7.6040302@FreeBSD.org> <44D1757D.4010103@ptree32.com.au> In-Reply-To: <44D1757D.4010103@ptree32.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on lh.synack.net X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=RCVD_IN_SORBS_DUL autolearn=no version=3.0.6 Cc: Maxim Sobolev , "current@freebsd.org" , Peter Grehan , Steve Kargl , freebsd-ppc@FreeBSD.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Fri, 04 Aug 2006 19:55:50 -0000 Peter Grehan wrote: >> But libpthread works in 6.0. What's the difference? > > jemalloc. From the backtrace, t's doing a TLS allocation, where I'm > certain phkmalloc didn't do anything like that. Indeed, jemalloc does add a dependency on TLS for PIC versions, though it can be configured to run (more slowly) without TLS, as Marcel pointed out. This appears to be a bug in the TLS implementation, rather than in jemalloc; the appropriate fix is to make TLS work. Jason From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 20:54:05 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 741A816A4DF; Fri, 4 Aug 2006 20:54:05 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FCA943D45; Fri, 4 Aug 2006 20:54:03 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CAA48629 (AUTH peterg@ptree32.com.au); Sat, 5 Aug 2006 06:54:00 +1000 (EST) Message-ID: <44D3B416.1060508@freebsd.org> Date: Fri, 04 Aug 2006 13:54:46 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Jason Evans References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org> <44D168A8.1060201@freebsd.org> <44D173B7.6040302@FreeBSD.org> <44D1757D.4010103@ptree32.com.au> <44D3A642.1000905@FreeBSD.org> In-Reply-To: <44D3A642.1000905@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Maxim Sobolev , "current@freebsd.org" , Peter Grehan , Steve Kargl , freebsd-ppc@FreeBSD.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Fri, 04 Aug 2006 20:54:05 -0000 >> jemalloc. From the backtrace, t's doing a TLS allocation, where I'm >> certain phkmalloc didn't do anything like that. > > Indeed, jemalloc does add a dependency on TLS for PIC versions, though > it can be configured to run (more slowly) without TLS, as Marcel pointed > out. This appears to be a bug in the TLS implementation, rather than in > jemalloc; the appropriate fix is to make TLS work. Exactly. I was pointing out the difference, sorry if it appeared to be putting blame on jemalloc. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 21:06:52 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91B6C16A4DD for ; Fri, 4 Aug 2006 21:06:52 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE4C343D46 for ; Fri, 4 Aug 2006 21:06:51 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CAA49734 (AUTH peterg@ptree32.com.au); Sat, 5 Aug 2006 07:06:34 +1000 (EST) Message-ID: <44D3B708.3010307@freebsd.org> Date: Fri, 04 Aug 2006 14:07:20 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D13736.6000209@freebsd.org> <20060804185211.GA31585@ns1.xcllnt.net> In-Reply-To: <20060804185211.GA31585@ns1.xcllnt.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Fri, 04 Aug 2006 21:06:52 -0000 > Question: > struct pcb has an array called pcb_context, which is > used to store non-volatile registers. The ABI tells me that > general registers 13 to 31 are to be saved. FreeBSD also saves > R12, according to the operands of the stmw intruction and the > description of that instruction. > > Is this observation correct (i.e. that we also save R12 in the > PCB) and is this intentional? It was. At the time there was register corruption and I think I decided to be more safe than sorry. I may have been reading something about r12 in the EABI that led me to believe that it needed to be saved. I don't believe there's any need for it to be saved. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 21:38:52 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0EBD916A4DA; Fri, 4 Aug 2006 21:38:52 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id A664443D6D; Fri, 4 Aug 2006 21:38:51 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost.xcllnt.net [127.0.0.1]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k74LcpIL032418; Fri, 4 Aug 2006 14:38:51 -0700 (PDT) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.13.6/8.13.6/Submit) id k74Lcpeu032417; Fri, 4 Aug 2006 14:38:51 -0700 (PDT) (envelope-from marcel) Date: Fri, 4 Aug 2006 14:38:51 -0700 From: Marcel Moolenaar To: Peter Grehan Message-ID: <20060804213851.GA32378@ns1.xcllnt.net> References: <44D12AC0.90009@sippysoft.com> <0C6ADBC1-E3DF-47D1-AA77-EA9BD14E059F@xcllnt.net> <44D13736.6000209@freebsd.org> <20060804185211.GA31585@ns1.xcllnt.net> <44D3B708.3010307@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D3B708.3010307@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Maxim Sobolev , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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: Fri, 04 Aug 2006 21:38:52 -0000 On Fri, Aug 04, 2006 at 02:07:20PM -0700, Peter Grehan wrote: > >Question: > > struct pcb has an array called pcb_context, which is > >used to store non-volatile registers. The ABI tells me that > >general registers 13 to 31 are to be saved. FreeBSD also saves > >R12, according to the operands of the stmw intruction and the > >description of that instruction. > > > >Is this observation correct (i.e. that we also save R12 in the > >PCB) and is this intentional? > > It was. At the time there was register corruption and I think I > decided to be more safe than sorry. I may have been reading something > about r12 in the EABI that led me to believe that it needed to be saved. > > I don't believe there's any need for it to be saved. Ok, thanks. I won't worry about it right now, but it does affect GDB when it's changed (if it's changed) in an incompatible way. For now, I'll have GDB skip r12 so that we have the option later to not save r12. FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 4 22:32:58 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B78C916A4EB; Fri, 4 Aug 2006 22:32:58 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0862743D45; Fri, 4 Aug 2006 22:32:57 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CAA57762 (AUTH peterg@ptree32.com.au); Sat, 5 Aug 2006 08:30:17 +1000 (EST) Message-ID: <44D3CAA7.4020102@freebsd.org> Date: Fri, 04 Aug 2006 15:31:03 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar , freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: gdb source 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: Fri, 04 Aug 2006 22:32:58 -0000 Hi all, I extracted the gdb source from my old 6.0 tree. This was an amalgam of work by a bunch of folk. I'll try and move it forward to -current but it there if anyone wants to have a look. There were a couple of files that were needed but had been deleted from the gdb vendor branch. http://people.freebsd.org/~grehan/gdbsrc.tgz later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Sat Aug 5 00:16:28 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from localhost.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9340616A4DE; Sat, 5 Aug 2006 00:16:28 +0000 (UTC) (envelope-from davidxu@freebsd.org) From: David Xu To: freebsd-current@freebsd.org Date: Sat, 5 Aug 2006 08:16:23 +0800 User-Agent: KMail/1.8.2 References: <44D12AC0.90009@sippysoft.com> <44D173B7.6040302@FreeBSD.org> <20060803224133.R87008@volatile.chemikals.org> In-Reply-To: <20060803224133.R87008@volatile.chemikals.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608050816.23656.davidxu@freebsd.org> Cc: Maxim Sobolev , "current@freebsd.org" , Wesley Morgan , Steve Kargl , Peter Grehan , freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc 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, 05 Aug 2006 00:16:29 -0000 On Friday 04 August 2006 10:47, Wesley Morgan wrote: > On Wed, 2 Aug 2006, Maxim Sobolev wrote: > > Peter Grehan wrote: > >>> #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, > >>> offset=4294934528) at rtld.c:2663 > >>> #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at > >> > >> I think you might want to try point libpthread at libthr with > >> libmap.conf. TLS is known to work for that where I don't think it works > >> for libpthread. > > > > But libpthread works in 6.0. What's the difference? > > > > -Maxim > > FWIW, recently csup stopped working for me in -current on i386. It fails > when checking the errno set after calling access() to check if a file > exists: > > Updater failed: Cannot create directories leading to > "/usr/ports/science/p5-Algorithm-SVMLight/Makefile": Unknown error: 0 > > According to gdb, errno is being set correctly but changes almost > immediately back to zero. Not sure how/why, and I'm not sure that I'm even > using gdb correctly for threaded applications. Switching to libthr with > libmap.conf results in the same error. > > I swear that it had something to do with turning on symbol versioning, but > attempting to turn it back off was not a fun experience and didn't have > the patience to see it through. libthr does not have mutliple versioning, the hack in libpthread is rather dirty, there is a plan to bump libthr version when symbol versioning is enabled and get rid of LIBTHREAD_1_0 symbol, it should only exist in libthr.so.2, libthr.so.3 will not have it. David Xu From owner-freebsd-ppc@FreeBSD.ORG Sat Aug 5 01:32:38 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E85B16A4DE; Sat, 5 Aug 2006 01:32:38 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D9E143D46; Sat, 5 Aug 2006 01:32:37 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k751Waps017001; Fri, 4 Aug 2006 21:32:36 -0400 (EDT) Date: Fri, 4 Aug 2006 21:32:36 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Xu In-Reply-To: <200608050816.23656.davidxu@freebsd.org> Message-ID: References: <44D12AC0.90009@sippysoft.com> <44D173B7.6040302@FreeBSD.org> <20060803224133.R87008@volatile.chemikals.org> <200608050816.23656.davidxu@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-ppc@freebsd.org, freebsd-current@freebsd.org, "current@freebsd.org" , Steve Kargl , Peter Grehan Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 01:32:38 -0000 On Sat, 5 Aug 2006, David Xu wrote: > On Friday 04 August 2006 10:47, Wesley Morgan wrote: >> On Wed, 2 Aug 2006, Maxim Sobolev wrote: >>> Peter Grehan wrote: >>>>> #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2, >>>>> offset=4294934528) at rtld.c:2663 >>>>> #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at >>>> >>>> I think you might want to try point libpthread at libthr with >>>> libmap.conf. TLS is known to work for that where I don't think it works >>>> for libpthread. >>> >>> But libpthread works in 6.0. What's the difference? >>> >>> -Maxim >> >> FWIW, recently csup stopped working for me in -current on i386. It fails >> when checking the errno set after calling access() to check if a file >> exists: >> >> Updater failed: Cannot create directories leading to >> "/usr/ports/science/p5-Algorithm-SVMLight/Makefile": Unknown error: 0 >> >> According to gdb, errno is being set correctly but changes almost >> immediately back to zero. Not sure how/why, and I'm not sure that I'm even >> using gdb correctly for threaded applications. Switching to libthr with >> libmap.conf results in the same error. >> >> I swear that it had something to do with turning on symbol versioning, but >> attempting to turn it back off was not a fun experience and didn't have >> the patience to see it through. > > libthr does not have mutliple versioning, the hack in libpthread is > rather dirty, there is a plan to bump libthr version when symbol versioning > is enabled and get rid of LIBTHREAD_1_0 symbol, it should only exist > in libthr.so.2, libthr.so.3 will not have it. Yes, there is a hack in libpthread that was necessary in order to enable symbol versioning for libc. It can and will be removed once all the necessary libraries have been bumped in preparation for the release of 7.0. -- DE From owner-freebsd-ppc@FreeBSD.ORG Sat Aug 5 20:03:04 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC9F016A4E0 for ; Sat, 5 Aug 2006 20:03:04 +0000 (UTC) (envelope-from ph.schulz@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 060A843D82 for ; Sat, 5 Aug 2006 20:03:03 +0000 (GMT) (envelope-from ph.schulz@gmx.de) Received: (qmail invoked by alias); 05 Aug 2006 20:03:01 -0000 Received: from p54A4031F.dip0.t-ipconnect.de (EHLO [192.168.1.36]) [84.164.3.31] by mail.gmx.net (mp019) with SMTP; 05 Aug 2006 22:03:01 +0200 X-Authenticated: #1954550 Message-ID: <44D4F975.2030608@gmx.de> Date: Sat, 05 Aug 2006 22:03:01 +0200 From: "Philip S. Schulz" User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Problems with the loader 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, 05 Aug 2006 20:03:04 -0000 Hi! I'm having trouble installing the latest snapshot on my 12" PowerBook G4. I bought it in February 2006, so I think it's the last revision before they stopped selling the PowerBooks. I managed to start the loader but then the loader complains "can't load kernel". Here's what I've tried so far: 1. Hold down 'C' while booting: I can hear the CD spin up, it seems like there is disk activity but then the drive spins down again and Mac OS X is started. 2. At the Open Firmware prompt, type "boot cd:,\boot\loader": The loader starts, but says: "can't load 'kernel'" and then "no bootable kernel" 3. I have tried to explicitely tell the loader where to load the kernel from by issuing "set currdev=cd:," and then try to type "boot" again. Unfortunately that didn't work, either. Makes sense, since the loader prints the correct boot device when started. Tried "boot /boot/kernel" and then the loader complains "Cant't find /boot/kernel". 4. Also I have tried to copy boot/ from the CD to the internal harddisk an boot from there by saying "boot hd:,\boot\loader" at the Open Firmware prompt. Same effect as in 2. 5. Finally I have tried an older kernel, the one that is on the 2005/12/06 snapshot. Same problems. I'm sure it's something that I'm doing wrong, but I haven't been able to find out just what. Does anybody know what it might be? Thanks, Phil. -- Don't fix it if it ain't broke. From owner-freebsd-ppc@FreeBSD.ORG Sat Aug 5 21:21:15 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE8F016A4F3 for ; Sat, 5 Aug 2006 21:21:15 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3240143D45 for ; Sat, 5 Aug 2006 21:21:14 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.14] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CAC04077 (AUTH peterg@ptree32.com.au); Sun, 6 Aug 2006 07:21:09 +1000 (EST) Message-ID: <44D50BC2.60704@freebsd.org> Date: Sat, 05 Aug 2006 14:21:06 -0700 From: Peter Grehan User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: "Philip S. Schulz" References: <44D4F975.2030608@gmx.de> In-Reply-To: <44D4F975.2030608@gmx.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: Problems with the loader X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 21:21:15 -0000 Hi Philip, > 1. Hold down 'C' while booting: I can hear the CD spin up, it seems > like there is disk activity but then the drive spins down again and Mac > OS X is started. Hmmm, that one's supposed to work. I even tried this out on the same model Powerbook, but a 15", the other day. One big advantage of these models is that the internal keyboard/mouse are USB so will work without an external keyboard. > 2. At the Open Firmware prompt, type "boot cd:,\boot\loader": The > loader starts, but says: "can't load 'kernel'" and then "no bootable > kernel" Close ! :) For a manual load from the cd, you have to pass 'cd:0' as an additional parameter e.g. boot cd:,\boot\loader cd:0 The problem is that giving a colon without an explicit partition number means the loader will use the 'default', or bootable, partition. Since cd's have to be created in hybrid HFS/CD9660 format to be understood by OFW, they have a partition table which has a partition that contains data but not the pre-iso9660 sectors (cd:3). This confused the loader since the partition it reads from have iso9660 offset values that appear to be incorrect, since offset 0 is actually the start of cd:3. I did hack up a loader to add this value to iso9660 offsets if the sniff test failed, but even this didn't work on all systems. The easier workaround was to use the extra parameter to boot. > 3. I have tried to explicitely tell the loader where to load the kernel > from by issuing "set currdev=cd:," and then try to type "boot" again. > Unfortunately that didn't work, either. Makes sense, since the loader > prints the correct boot device when started. Tried "boot /boot/kernel" > and then the loader complains "Cant't find /boot/kernel". Close: as above you need 'cd:0'. At the loader prompt you can issue 'ls /' to see if that worked, or even 'ls cd:0/' before currdev is changed. > 4. Also I have tried to copy boot/ from the CD to the internal harddisk > an boot from there by saying "boot hd:,\boot\loader" at the Open > Firmware prompt. Same effect as in 2. Makes sense: the loader will use the volume it was booted from to try and load the kernel. Since 'hd:' is most likely HFS+ formatted, the loader won't be able to read it. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Sat Aug 5 21:51:04 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1261016A504 for ; Sat, 5 Aug 2006 21:51:04 +0000 (UTC) (envelope-from ph.schulz@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id EA7D243D49 for ; Sat, 5 Aug 2006 21:51:02 +0000 (GMT) (envelope-from ph.schulz@gmx.de) Received: (qmail invoked by alias); 05 Aug 2006 21:51:01 -0000 Received: from p54A4031F.dip0.t-ipconnect.de (EHLO [192.168.1.36]) [84.164.3.31] by mail.gmx.net (mp018) with SMTP; 05 Aug 2006 23:51:01 +0200 X-Authenticated: #1954550 Message-ID: <44D512C4.10402@gmx.de> Date: Sat, 05 Aug 2006 23:51:00 +0200 From: "Philip S. Schulz" User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: grehan@freebsd.org References: <44D4F975.2030608@gmx.de> <44D50BC2.60704@freebsd.org> In-Reply-To: <44D50BC2.60704@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-ppc@freebsd.org Subject: Re: Problems with the loader 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, 05 Aug 2006 21:51:04 -0000 on 05.08.2006 23:21 Uhr Peter Grehan said the following: > Hi Philip, > >> 1. Hold down 'C' while booting: I can hear the CD spin up, it seems >> like there is disk activity but then the drive spins down again and >> Mac OS X is started. > > Hmmm, that one's supposed to work. I even tried this out on the same > model Powerbook, but a 15", the other day. > > One big advantage of these models is that the internal keyboard/mouse > are USB so will work without an external keyboard. > Well, maybe the 12" and 15" models are different. The internal keyboard doesn't seem to work. >> 2. At the Open Firmware prompt, type "boot cd:,\boot\loader": The >> loader starts, but says: "can't load 'kernel'" and then "no bootable >> kernel" > > Close ! :) > > For a manual load from the cd, you have to pass 'cd:0' as an additional > parameter e.g. > > boot cd:,\boot\loader cd:0 > That worked. Thanks! I should mention though that I got the "boot cd:, ..." line from http://people.freebsd.org/~grehan/install.html :-) [...] >> 4. Also I have tried to copy boot/ from the CD to the internal >> harddisk an boot from there by saying "boot hd:,\boot\loader" at the >> Open Firmware prompt. Same effect as in 2. > > Makes sense: the loader will use the volume it was booted from to try > and load the kernel. Since 'hd:' is most likely HFS+ formatted, the > loader won't be able to read it. > Right, it is HFS+. Thanks again, Phil. -- Don't fix it if it ain't broke. From owner-freebsd-ppc@FreeBSD.ORG Sat Aug 5 23:26:01 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4076A16A4DD for ; Sat, 5 Aug 2006 23:26:01 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF1B543D45 for ; Sat, 5 Aug 2006 23:26:00 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.14] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CAC15054 (AUTH peterg@ptree32.com.au); Sun, 6 Aug 2006 09:25:46 +1000 (EST) Message-ID: <44D528F9.3030604@freebsd.org> Date: Sat, 05 Aug 2006 16:25:45 -0700 From: Peter Grehan User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: "Philip S. Schulz" References: <44D4F975.2030608@gmx.de> <44D50BC2.60704@freebsd.org> <44D512C4.10402@gmx.de> In-Reply-To: <44D512C4.10402@gmx.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: Problems with the loader X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 23:26:01 -0000 >> One big advantage of these models is that the internal keyboard/mouse >> are USB so will work without an external keyboard > > Well, maybe the 12" and 15" models are different. The internal keyboard > doesn't seem to work. That kinda sucks. > That worked. Thanks! I should mention though that I got the "boot cd:, > ..." line from http://people.freebsd.org/~grehan/install.html :-) I'll change the name of that link. ~grehan/iso_install.txt is the one to use. later, Peter.