panic booting install CD

Peter Grehan grehan at freebsd.org
Wed Oct 19 16:43:36 PDT 2005


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.


More information about the freebsd-ppc mailing list