From owner-freebsd-ppc@FreeBSD.ORG Wed Oct 19 23:43:36 2005 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 BBF0E16A41F for ; Wed, 19 Oct 2005 23:43:36 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from hummer.onthenet.com.au (hummer.OntheNet.com.au [203.13.68.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ECD043D62 for ; Wed, 19 Oct 2005 23:43:36 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [203.144.18.185] (CPE-18-185.dsl.OntheNet.net [203.144.18.185]) by hummer.onthenet.com.au (Postfix) with ESMTP id 08AB919FC50; Thu, 20 Oct 2005 09:43:35 +1000 (EST) Message-ID: <4356DA25.10303@freebsd.org> Date: Thu, 20 Oct 2005 09:43:33 +1000 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Graham J Lee References: <006601c5d406$ea0a8f20$13b46743@TIM> <4355CD0D.50301@freebsd.org> <3CEE03B7-701F-47B4-9283-B8AB6B657DEC@teaching.physics.ox.ac.uk> <4356243F.6090703@freebsd.org> <4356D288.9040404@teaching.physics.ox.ac.uk> In-Reply-To: <4356D288.9040404@teaching.physics.ox.ac.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: panic booting install CD 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, 19 Oct 2005 23:43:36 -0000 Hi Graham, > Sadly I get the same panic when I do that on my hardware. Equally sadly > I'm no kernel programmer so my attempt to chase down the panic by > looking at the current rev of kern_mutex.c didn't yield anything. A > pity because I'd like to get FreeBSD working on this machine and then > see if any userland needs tweaking (my C skills do at least run that > far) - so if there's any way I can help track down this problem I'd like > to do that. I'm certain that it isn't a problem with the mutex code. My suspicion is that there isn't enough processor state saved/restored when the kernel calls into OpenFirmware, in particular the SPRG0-3 registers. The kernel uses the SPRG0 register to point to the per-cpu data structure, which includes the curthread pointer. SPRG0 is probably trashed and ends up pointing to a garbage area which causes the mutex assertion to fail. > Actually, I probably *could* create a bootp environment so that the > Sawtooth boots the kernel over the network then tries to use the > filesystem on the CD as its root, would that work? Could I use that to > attack the kernel problem? Yep. I do most of my testing with netboot, though for this case it'll be a CD-RW shuffle since that's the only way I can reproduce it. > How would I build the FreeBSD kernel under Darwin? Unfortunately this isn't possible. I'll see if my SPRG0 save/restore theory holds, and if so, I'll post a kernel that you can try out with a netboot. > [enthusiastic, if somewhat out of depth] Enthusiasm counts for more :) later, Peter.