Subject: Re: port-macppc/30410: netbsd-2, netbsd-3, and -current GENERIC crash
To: None <gnats-bugs@netbsd.org>
From: Timo Schoeler <timo.schoeler@macfinity.net>
List: netbsd-bugs
Date: 06/03/2005 00:27:48
thus riz@tastylime.net spake:
>>Number:         30410
>>Category:       port-macppc
>>Synopsis:       post-2.0 GENERIC kernels crash with MCHK trap on G4/466
>>Confidential:   no
>>Severity:       critical
>>Priority:       high
>>Responsible:    port-macppc-maintainer
>>State:          open
>>Class:          sw-bug
>>Submitter-Id:   net
>>Arrival-Date:   Thu Jun 02 22:13:00 +0000 2005
>>Originator:     Jeff Rizzo
>>Release:        NetBSD 2.0_STABLE
>>Organization:
>>Environment:
> 
> 	
> 	
> System: NetBSD grendel 2.0_STABLE NetBSD 2.0_STABLE (GENERIC) #0: Sun May 22 18:12:21 PDT 2005 riz@grendel:/home/riz/buildobj/usr/src/sys/arch/macppc/compile/GENERIC macppc
> Architecture: powerpc
> Machine: macppc
> 
>>Description:
> 
> 	A GENERIC kernel compiled in the standard way (no special COPTS)
> 	crashes with an MCHK trap during bootup on certain G4 systems.
> 
> Here's the crash message, in a ten-finger copy:
> 
> [...boot messages...]
> atapibus0 at atabus1: 2 targets
> trap: pid 3.1 (atabus1): kernel MCHK trap @ 0x518e0c (SRR1=3D0x2041020)
> panic: trap
> Stopped in pid 3.1 (atabus1) at netbsd:cpu_Debugger+0x18:	lwz	r11, r1, 0x0
> db>
> 
> There have been several mailing list threads about this.  Most recently:
> 
> http://mail-index.netbsd.org/port-macppc/2005/04/03/0003.html
> 
> Note that compiling GENERIC with certain flags (such as -O3, or -maltivec)
> creates a kernel that _does_ boot.
> 
> 
>>How-To-Repeat:
> 
> 	Try to boot a -current, 3.0_BETA, or 2.0_STABLE GENERIC kernel
> on a power mac G4.
> 
> 
>>Fix:
> 
> 
> 	Workaround: compile the kernel with COPTS+=-O3 .

IIRC somebody mentioned that it's possible to solve via some fiddling on
PowerPC assembler code used. unfortunately, i'm not able to dig into this...

cheers,

-- 
Timo Schoeler | http://macfinity.net/~tis | timo.schoeler@macfinity.net
//macfinity -- finest IT services | http://macfinity.net
Key fingerprint = F844 51BE C22C F6BD 1196  90B2 EF68 C851 6E12 2D8A

There are 10 types of people in the world. Those who understand binary
and those who don't.