Subject: S900/E100 progress (well, sort of)
To: None <port-macppc@netbsd.org>
From: Michael <macallan18@earthlink.net>
List: port-macppc
Date: 07/14/2004 12:37:17
Hello,

after getting ohci and yds to work I had a closer look at the ethernet 
part of the E100 card - sort of a (probably weird) DEC 21140, so far no 
operating system besides MacOS could make any use of it, NetBSD and 
Linux both claim that they can't map the card's registers.
So, the reason is probably that OpenFirmware doesn't see the card - 
there's no /bandit/pci1011,9 in the device tree, so the PCI config 
registers contain random data when the tlp driver tries to attach and 
memory (probably) isn't enabled anyway, so mapping fails. The fixpci() 
routine in pci/pci_machdep() digs only through the OF tree so it 
doesn't see the card either.

A solution could be something like this:
- configure the PCI stuff in the tlp driver, maybe hardwire it to some 
'safe' values for the time being - shouldn't impact anything else since 
the E100 fits only in one slot so the ethernet controller will always 
be on PCI 0:11:0
- enable memory and so on by hand
- hope the driver attaches
- enable this by some option in the kernel config

I know this is a horrible hack but
- the tlp driver is already full of quirks, the card probably needs 
more - I'm almost certain that it uses some non-standard SROM too.
- enabling it in pci_machdep.c would need a function that looks for PCI 
devices which OF didn't touch - do we really need/want that?

So...
- I'll play with it a bit more and see if I can figure out how to get 
the registers mapped to some useful address ( I found out which 
addresses the MacOS driver uses )
- bug someone about allocating an interrupt and an address range for 
the card in NetBSD so I won't have to hardwire it in case I get it 
mapped

and finally - is there a way to permanently add entries to the OF 
device tree? I tried to make OF configure the card by adding the device 
number to pci-probe-list ( it contains -1 by default ) but this made 
the machine hang on poweron. probe-pci hangs too, doesn't get anywhere 
in several minutes. /bandit doesn't have the probe-self method that's 
described in Apple's OpenFirmware docs so i guess they're referring to 
something newer and hope no one would try to use 1.0.5 :/

have fun
Michael