Subject: obio attachment and Macs w/ two or more I/O controllers
To: None <port-macppc@netbsd.org>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 11/15/2004 18:38:47
I've come across a problem in the 2.0RC* obio attachment process that
seriously affects Macs with two or more I/O controllers. An example
would be Wallstreet Powerbooks with both Heathrow and Garwick chips.
Heathrow controls the main bus, Garwick controls the pc card stuff. In
order to determine how many Macs and users this affects, I am asking
that list members consult their 2.0RC* dmesgs for the following:

two or more obio nodes (obio0 and obio1)
obio nodes that identify as devices other than 16 (obio0 at pci0 dev 13
function 0)
I/O controllers not configured
devices behind non-primary I/O controllers not working

The core problem is in the manner in which PCI devices are discovered
and their location in the Open Firmware tree. The obio code assumes that
the mac-io node will be the only PCI one found and that it will be at
the top of the OF tree, so that walking the tree picks up the remaining
devices. For single I/O Macs this is technically correct but not a good
assumption to make. For multi-I/O controller Macs, it does not properly
correlate PCI device ID to OF tree location, and the right IRQ will not
be ascertained.

I do ask for feedback on this, please. So far my requests for testing
and feedback have gone almost unanswered (the few who have contacted me
are helping a lot but are not enough).

2.0 is to be a major milestone in NetBSD's history, and it should be
all-hands-on if we want macppc to be as bug-free as possible.

thanks,
tim