Subject: Re: Softfloat and -current
To: Julio M. Merino Vidal <jmmv@menta.net>
From: Bruce ONeel <edoneel@sdf.lonestar.org>
List: port-mac68k
Date: 11/16/2004 15:29:07
Hi,


I spent the morning annoying my office mates with 
mac startup chimes and I think I may have found soemthing.

Do you have apple talk on and the ethernet cable pluged in?
Could you  try with the cable unpluged?

The build that I worked with lives in 
ftp://ftp.ziaspace.com/pub/NetBSD/m68k/current
which was built with a current cvs updated 
around 0600 UT this morning.

Basically I keep crashing too, though with 
different errors.  I get type1 and type2, as well
as fpu errors.  It seems a bit random.

Sometimes I can get a stack trace from within
the debugger, and, if I do get a sensible trace
I keep finding  if_attachdomain.  This lives in
sys/net/if.c.

What's odd about this is that we are long past
attaching the sn0 device.  Just like you I crash
between the md0 line and the scsibus0 line.

In addition I am ok with the normal kernel, only
the INSTALLSBC kernel fails.

After a couple of chicken sacrifices I remembered that
crashing on boot used to be a problem for me when I 
had apple talk turned on AND the ethernet cable attached.

Some background.  PRAM batteries are very hard to replace
on powerbook 540s, so, I don't bother.  That means that I
have to set the clock on bootup.  In addition since powerbooks
500s seem not to turn on devices which aren't used, I also
have to switch to ethertalk when I boot so that my 
ethernet interface is available in NetBSD.

Before the 2.0 beta series of kernels, I had fairly consistant crashes
when booting with the ethernet attached.

So, on a guess, I tried unplugging the ethernet before booting
the installsbc kernel.  It booted.  I tried a half dozen more times
and each time it booted without problem.

My guess is that some interrupt is happening and we are jumping
to some bit of code that we shouldn't jump to.  My guess
is that the INSTALLSBC kernel is big enough to overwrite the
handler for this interuppt but the normal kernel is not.

Finally my guess is that once init starts that the interupt table is
now ok and therefore we don't crash anymore.

For me this crashed in 1.6.2, works ok with 2.0, and now fails
again.  I poked around a bit and nothing jumped out at me
that could cause this.

cheers

bruce

Julio M. Merino Vidal" <jmmv@menta.net> wrote:
> Date: Sun, 14 Nov 2004 16:17:58 +0100
> From: "Julio M. Merino Vidal" <jmmv@menta.net>
> Subject: Re: Softfloat and -current
> To: Bruce ONeel <edoneel@sdf.lonestar.org>
> Cc: port-mac68k@NetBSD.org
> content-length: 971
> 
> On Fri, 12 Nov 2004 14:01:17 +0200
> Bruce ONeel <edoneel@sdf.lonestar.org> wrote:
> 
> > Hi,
> > 
> > The bad news is that while the 2.99.10 kernel seems to work fine,
> > install kernel does not work for me as well.
> 
> The install kernel still breaks for me :-(  I've rebuilt everything
> from scratch just a moment ago, passing MKSOFTFLOAT=yes to the whole
> build (as usual).  And this is with your fix to libm's Makefile
> applied.  However, I get:
> 
> [...]
> nubus0 at mainbus0
> fpu0 at mainbus0 (emulator)
> [...]
> ams0 at adb0 addr 3: EMP mouse <@300> 1-button, 200 dpi
> wsmouse0 at ams0 (mux ignored)
> md0: internal 2560 KB image area
> Kernel Illegal Instruction Trap.
> trap type 2, code = 0x0, v = 0x0
> kernel program counter = 0x3fdfd8
> kernel: Illegal instruction trap
> pid = 0, lid = 1, pc = 003FDDFD8, ps = 2600, sfc = 1, dfc = 1
> [blahblahblah]
> 
> Any ideas?
> 
> Thanks
> 
> -- 
> Julio M. Merino Vidal <jmmv@menta.net>
> http://www.livejournal.com/users/jmmv/
> The NetBSD Project - http://www.NetBSD.org/