Subject: Re: NetBSD on OpenFirmware-less Macintoshes
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 07/09/2007 04:25:35
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Jul 7, 2007, at 08:55, Hauke Fath wrote:

> a few days ago, a Power Macintosh 7100/80 has joined my collection. I  
> have
> looked on the web a bit since, to get an idea of what blocks the way to
> NetBSD support,a nd I'd like to spawn a (yet another ;) discussion.
>
> Of the two major issues, support for the 601 and the lack of  
> OpenFirmware,
> the former seems to come along in arch/powerpc, right? So I  
> concentrated on
> looking into hardware support for now.
>
> What came up time and again, is the question whether support for 1st
> generation Power Macs should be part of an existing port (macppc,  
> mac68k),
> or a new port. At the time, Bill Stouder-Studenmund strongly advocated
> integrating Nubus Macs with the macppc port similarly to what happened  
> with
> sun3 and sun3x:
>
> <http://groups.google.com/group/sol.lists.netbsd.port.macppc/ 
> browse_thread/threa
> d/9a1cae1740a3b1c1/896509ba2496e012>
>
> Earlier, Bill had outlined a possible autoconf structure that would  
> serve
> both non-OF and OF power Macs:
>
> <http://mail-index.netbsd.org/port-macppc/1998/10/07/0001.html>

I don't like that idea.
NuBus and PCI PowerMacs don't have much more in common than the CPU  
class and ADB ( ok, that's a little bit exaggerated but I'm sure you  
know what I mean )
As it is today macppc is pretty much CHRP with apple flavour.

> While the sun3/sun3x example sounds appealing, the two machine classes
> share a lot more than just the cpu (68020 vs. 68030). The macppc port,
> OTOH, is closely tied to OpenFirmware support (mainbus already implies
> presence of OF), and PCI (obio attaches to pci, not mainbus).

Exactly.

> 1st generation Power Macs have neither of the two, and because of their
> different configuration mechanism, hardware, interrupt structure are a  
> lot
> closer to mac68k than to macppc. While there have been discussions to  
> add
> Nubus support to LinuxPPC by constructing a fake OF device tree for  
> this
> machine class, the idea was rejected:
>
> <http://groups.google.com/group/comp.os.linux.powerpc/browse_thread/ 
> thread/12bc8
> 6ecd3d55134/03a29a4b79f8c488>
>
> In the absence of such a fake OF-like device tree, support for 1st
> generation Power Macs results in either littering code with #ifdefs  
> where
> it refers to hardware information, or separating source trees (alike
> sun3/sun3{,x}/).

I'd rather see NuBus code factored out of mac68k, cleaned of 68k-isms (  
if any ) and moved to sys/dev/nubus, same with ADB ( code exists but so  
far works only on macppc, mainly because I don't have any other  
ADB-equipped hardware )
Not sure what else could be recycled - interrupt handling from mac68k?  
mesh and friends from macppc? Any other obio devices that are similar  
enough?

IMHO faking OF etc. for NuBus PowerMacs is too much work and additional  
messiness for too little gain. Better start a nice, clean new port and  
have it share as much code as possible with the other mac ports.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRpHxAMpnzkX8Yg2nAQLHMggAg0GmXeXroEM0Rk3KOB4NJmyeok+JvzJX
pmD5HxQhtjKaqXeM6vwckt6gQdygCxZC7PmeFjsayZOHG2u5Fop3u6Kwp4Ipgu+o
EqiLQZ+tTKnP7BsXT2OCMLn08ql6sZOHnFUcK3OhHByuMluCgr+fvIW8XfmhjBS9
3pfARsrK4l1kCyF+bE3/37jon+nxguIZklq+y9PUs6hGDZ7kTy6NRx1y6t6YyB/D
BaF4Zru4/3kVnXStkTdzw65X7V2uKilTPT8i/MtmuOvF1vyjk5gAxb92YS8CpiU9
wNAPyjeXV8lcVkPCjYEPdUthl+pPAM8My2TRlckvwLY2erCC/zliSw==
=5Ntg
-----END PGP SIGNATURE-----