Subject: Re: nubus_attach() probe problems on LCIIs
To: Brandon D. Valentine <bandix@looksharp.net>
From: Michael R. Zucca <mrz5149@acm.org>
List: port-mac68k
Date: 03/28/2001 08:40:32
At 2:12 PM -0500 3/26/01, Brandon D. Valentine wrote:
>I encountered some similiar problems in the archives, but never a
>solution.  Here's my report.  Yesterday I sat down to help a friend get
>NetBSD going on his truckload(almost literally, he went to a school
>district auction) of old Macs.  He's got Classics, and LCs, and LCIIs,
>and LCIIIs for the most part, with some IIsis and one IIci throw in.  We
>decided to start with a couple of LCIIs since they were already
>reasonably assembled and we already had some commslot ethernet cards.
>We got everything installed just great and they're up and running for
>over 10 hours now without a hitch.  The one problem is that both of them
>had the ethernet interface probed and attached multiple times.  On the
>one I took home I've got:
>sn0 at nubus0 slot a: Macintosh LC Ethernet Adapter
>sn0: Ethernet address 00:01:98:34:a2:d9
>sn1 at nubus0 slot c: Macintosh LC Ethernet Adapter
>sn1: Ethernet address 00:01:98:34:a2:d9
>sn2 at nubus0 slot e: Macintosh LC Ethernet Adapter
>sn2: Ethernet address 00:01:98:34:a2:d9
>
>He's got one with an ae card in it that probed and attached 5 times!
>That's right ae1-5.  Now I can ifconfig one of these interfaces and
>start using it, I've been using sn2, and it works fine.  However, it's
>obviously not desirable in the long run for these machines to exhibit
>this behavior.  Is there any info I can provide to help fix
>nubus_attach() not to find some many instances of these devices?

I think the reason this is happening is that on the LC's the PDS slot is
mapped at $E but for some reason, MacOS or the ROM shadows it at $A and $C.
Other Macs exhibit this odd behavior as well.

To get around this, I think it would make sense to put a little bitmask in
the machine description structs in machdep.c. The bitmask could indicate
which nubus slots actually exist for a machine. Then, the nubus probe code
could check that code and probe just the slots that exist. Though, there's
the funny case of a duodock which can change the number of slots it has
depending on whether its docked or not, but I suppose the structure could
be updated at run-time for Duos.

This is pretty easy and should just require a perusal of the Tech specs for
each machine to see where their Nubus slots map.






____________________________________________________________________
 Michael Zucca - mrz5149@acm.org - http://www.mdc.net/~mrz5149/
 "I will choose a path that's clear. I will choose Freewill. "
  --Rush, Freewill
____________________________________________________________________