Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Oct 2005 09:43:33 +1000
From:      Peter Grehan <grehan@freebsd.org>
To:        Graham J Lee <leeg@teaching.physics.ox.ac.uk>
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: panic booting install CD
Message-ID:  <4356DA25.10303@freebsd.org>
In-Reply-To: <4356D288.9040404@teaching.physics.ox.ac.uk>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4356DA25.10303>