Subject: NetBSD on OpenFirmware-less Macintoshes
To: NetBSD/macppc mailing-list <port-macppc@netbsd.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-macppc
Date: 07/07/2007 14:55:41
All,

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>

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). 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}/).

When I browsed the macppc/conf/* files, I stumbled on the fact that
macppc/conf/files.macppc, which is unique per port, unconditionally pulls
in OF support files both from arch/powerpc, and dev/ofppc. Unfortunately,
the 'include' statement does not take an attribute (see
sun3/conf/files.sun3). Littering the powerpc files.* with 'of' attributes
doesn't sound too appealing, either.

Comments?

	hauke


--
"It's never straight up and down"     (DEVO)