Subject: Re: Sun compatability...
To: None <thorpej@nas.nasa.gov, mouse@Collatz.McRCIM.McGill.EDU>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 01/15/1996 11:59:52
> From: Jason Thorpe <thorpej@nas.nasa.gov>
> Date: Sat, 13 Jan 1996 15:13:40 -0800

[ Thinking about Sun3x port... ]

> Since it does have a 68030, it will require a completely different pmap.  
> Also, not sure how DVMA might be handled on a sun3x.
> 
> I've been thinking of how one might deal with the pmap issue.  The sun3 
> would have to start using the `mmutyp' global like the other m68k ports 
> do.  This would enable libkvm to deal with the differences (providing we 
> adopt Leo Weppleman's libkvm enhancements, which I think we ought to 
> :-).  Early on, in pmap_bootstrap(), the kernel would decide which type 
> of MMU is present in the system: Sun or Motorola.  The exported 
> functionality of the pmap module (i.e. what the MI VM system uses) would 
> be accessed through trampoline functions.  The trampoline functions would 
> in turn call the "real" routine based on MMU type.  I figure the neatest 
> way to do this would be to have the startup code set up a pointer to the 
> correct pmap ops switch, and have the trampolines just jump though 
> function pointers.

I don't quite see the motivation for trying to make one kernel run on
both the Sun3 and Sun3x architecture.  They are VERY different.
It would be fairly simple to use a common source area, (i.e. both
kernels could be built under /sys/arch/sun3) but there would need to
be some files that you get with "option sun3" and others that you get
with "option sun3x" (which are mutually exclusive).  The config file
for sun3x would have "esp" and the Moto. pmap code, etc.

> Also, there's whether or not the sun3x boots with the MMU enabled.  If 
> not, it would probably require some changes to the boot code, which uses 
> DVMA, if I'm not mistaken.

I would use a separate locore.s for the Sun3x also (possibly with a
#include for the section common to Sun3 and Sun3x)

> Anynow, it's tricky, but I don't think it's impossible.  Whomever pulled 
> it off would definitely get a cookie for effort (gonna have to put some 
> serious thought into that code...)  Heck, doing it right would definitely 
> be an achievement...

> Well, I'd like to see it run, too.  JT Conklin has a 3/80, as does a 
> friend of mine in Portland, OR.

Anyone want to send me a Sun3/80?

Gordon