Subject: Re: 68040-MacBSD Support
To: None <ender@is.rice.edu>
From: Masami and Ken Nakata <masami@fa2.so-net.or.jp>
List: port-mac68k
Date: 02/03/1997 09:50:33
On Sun, 2 Feb 1997 01:44:27 -0600 (CST),
Colin Wood <ender@is.rice.edu> wrote:
> > On 2/1/1997 at 6:27 PM -0600, you wrote:
> > 
> > > 2) This machine has a 68LC040, (i.e. no FPU).  As such, it is likely to
> > > cause frequent seg faults and illegal instruction errors while running
> > > until someone manages to fix the bug in 68LC040 floating point emulation.
> > 
> > Hey... I don't have much of a clue, but this little bug is the only thing
> > holding me back from actually running NetBeastie on my system. While I'm
> > not a math person and I haven't ever done any work on a Unix kernel, I am
> > fluent in C and I have a good nose for bugs. Is there anything that someone
> > sans a working NetBSD setup can do to help track down this bug? If there
> > is, I'd dearly love to help. I have an old CodeWarrior compiler, so I can
> > generate code without having a working gcc, and I have enough free time to
> > take on a new project.

Well, okay, since I suppose I'm the FPE guy, I'll answer these
questions.  The nature of the problem is, I think, well understood,
and we have nailed down why it doesn't work.  The only thing there's
left is to actually fix the code.  Right now, I can't find much time
to even turn on my SE/30 to do the work.

Sorry everyone.  I won't hold anyone who's willing to take it over
from me, BTW.  However, since I wrote the most of it, it won't take
that long once I get to work.  And don't worry too much about testing:
I have an LC630 that has a 68LC040.

> I'm not too sure who to ask about this one, although Ken Nakata along 
> with a couple of other people were working on fixing this.  The bug is 

Wait, I'm not aware of these "coupld of other people".  Who are they? ;-)

> not Mac-specific, but affects all the m68k-based ports which have 
> machines with the 68LC040.
> 
> > PS: As I've reported before, I've had NetBSD running, but it segfaulted an
> > awful lot, so I wasn't able to do anything reliably. Now, however, I have a
> > bit more disk space to devote to NetBSD, and I'd love to get something
> > running.
> 
> Yeah, these seg faults are a common symptom of the FPE bug.  About the 
> only other thing I can say is that you can take a look at the source 
> code, currently available from ftp.netbsd.org.

In order to fix it, you have to be somewhat familiar with M68000
assembly programming model, and will need a few 68k literatures from
Motorola, too.  More specifically, _M68000 Programmer's Reference
Manual_, _MC68030 User's Manual_, _MC68881/68882 User's Manual_, and
the most important _MC68040 User's Manual_.

Ken