Subject: Re: puc based 16550 on macppc?
To: netbsd-macppc macppc <port-macppc@NetBSD.org>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 04/23/2007 14:38:04
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Joachim,

to sum things up - what's wrong with this card is that it hardwires the 
upper 16 bit of its BARs to zero which OpenFirmware considers an error 
and therefore refuses to configure/enable the card.
To make it usable anyway we'd have to enable it by hand, write some 
safe values into its BARs and figure out which interrupt to use.
Finding he interrupt shouldn't be a problem - the bridge's 
interrupt-map should tell us, the code is already there. The rest is 
easy enough to do, I can write you such a patch if you want.
What we'd need are some safe values for the BARs which are:
- - size 0x10, naturally aligned ( as in - the 4 lower bits are zero ) - 
mainly because OF said so
- - <0xffff because the upper bits are hardwired to 0
To find such values you need to look at all your PCI devices on the 
same host bridge, jot down which IO ranges they use and then pick two 
that don't collide with anything.
The problem with this - it's a gross hack that won't go into the 
official source tree. If you add new cards you may need to pick new 
addresses for the puc since OF - being unaware of this hack - may 
assign the ranges you picked to said new card and then things would 
blow up.

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

iQEVAwUBRiz9DMpnzkX8Yg2nAQJbogf/UrDrc57lVYjiLiiKJ3LbnfM+sKFb/gU+
jqvr8FpZK0c840HK2dUaBzkFky8GJFKTJnOeH2d++kR+MfmHgcTm3xRvTx4/M22D
K5hxNBViZnCTAE3n3XXHobOwWGj9AzzbB+XBuZ/f/r+tC1+VutSizu9aSPCMp/wY
XRRTMZ1TLeH9QiO/u3icudYl+nVBz4hd5LIR3OPnUWonLdSfh3vFbmXZgBvmAMzw
t1kFSZUxRdkLscXPxJepNDj9wAUsn0cNX4XiHPfPel5RuBn39SMpJsemnwm9Yfwz
3d6NkpXu/SVuoo47MzwFzFdecvRCwTOgGoneQXw/edcmoogehEDOew==
=9qjW
-----END PGP SIGNATURE-----