Subject: Re: NetBSD-Mach?
To: The Great Mr. Kurtz [David A. Gatwood] <davagatw@mars.utm.edu>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mac68k
Date: 12/09/1996 14:08:42
On Mon, 9 Dec 1996 13:55:55 -0600 (CST) 
 "The Great Mr. Kurtz [David A. Gatwood]" <davagatw@Mars.utm.edU> wrote:

 > I'm curious.  I know somebody has a Lites-based server out there to run on
 > top of the Mach3 Microkernel (of MkLinux fame), which brings a few 
 > questions to mind:
 > 
 > 1.	Is anyone working on/planning to work on a port of NetBSD to
 > Mach3?

Actually porting NetBSD to Mach would be almost pointless.  NetBSD is
a standalone kernel.  A better approach is to port NetBSD to the hardware,
possibly using some code from Mach.

 > 2.	Are the hardware-dependant sections of NetBSD's code essentially
 > all in one section, or are there a number of #ifdefs scattered throughout
 > the code?

NetBSD's code is well-separated into machine-dependent and
machine-independent sections.  The machine-specific code is under
src/sys/arch.

 > 3.	What major sections would have to be replaced by Mach calls other
 > than the video display code, ADB code, MMU code, and SCSI code?  How bad
 > would the MMU part be?

As for SCSI code, that depends on the type of SCSI chip used in the machine.
I can only assume you're referring to NuBus PowerMacs.  Those proably use
an NCR53C96 SCSI chip; in NetBSD, the `esp' SCSI driver.  Once you have the
chip driver done, you get the rest of the SCSI code for free, since NetBSD's
SCSI code is machine-independent.

You could probably steal the display and ADB code from Mach.  The MMU code
(also known as the `pmap module') can probably be lifted almost wholesale
from NetBSD/powerpc.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939