Subject: port-macppc/31249: multiprocessor kernel (2.0.2 & -current) panics on PowerMac 9500 w/ 2 x ppc604 @ 200 mhz
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 09/09/2005 07:57:51
>Number:         31249
>Category:       port-macppc
>Synopsis:       multiprocessor kernel (2.0.2 & -current) panics on PowerMac 9500 w/ 2 x ppc604 @ 200 mhz
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 09 07:57:51 +0000 2005
>Originator:     Kjell Konis
>Release:        2.0.2
NetBSD PM9500 2.0.2 NetBSD 2.0.2 (GENERIC) #0: Tue Mar 22 16:19:08 UTC 2005 macppc

(obviously not from the panicing kernel)
I built a kernel with multiprocessor support using the adjustkernel utility to generate the configuration.  When booted, the kernel panics either just before or just after the login prompt.  Here is a trace from my most recent panic:

<startup text>

NetBSD/macppc (PM9500) (ttyE0)

login: kjell
mp_save_fpu_proc{1} pid = 317.1, fpcpu->ci_cpuid = 0
panic: mp_save_fpu_proc
Stopped in pid 317.1 (login) at netbsd:cpu_Debugger+0x10:      lwz   r0, r1 0
bd(1)> trace
0xd5167e00: at panic+x19c
0xd5167e90: at mp_save_fpu_lwp+0xec
0xd5167eb0: at save_fpu_lwp+0x70
0xd5167ec0: at trap+0x94c
0xd5167f40: user FPU trap by 0xefca4530: srr1=0xd032
            r1=0xffffd0e0 cr=0x24004048 xer=0 ctr=xefca1fe8

The panic occurs on kernels built with the sources included with the 2.0.2 release as well as sources from the -current branch (the branch obtained using 'cvs update -A -dP').

The panic only occurs when the openfirmware output-device is set to the pci video card, which in my particular machine is /bandit@F2000000/ATY,XCLAIM@D.  If the output-device is set to ttya then the kernel seems to run just fine (I actually built the kernel 4 times trying to induce the panic).

My machine is a powermac 9500 with a daughter card with 2 604 ppc cpus running at 200 MHz, 144 mMB of RAM, a 350 MB hard drive (ID 0) with MacOS 9 and a 4.3 GB hard drive (ID 4) with NetBSD.
In openfirmware set the output-device to /bandit@F2000000/ATY,XCLAIM@D then boot the multiprocessor kernel and wait for the panic.

0 > setenv output-device /bandit@F2000000/ATY,XCLAIM@D  ok
0 > boot scsi-int/sd@4:0

No fix other than to set the output-device to ttya and connect remotely.