Subject: Re: puc based 16550 on macppc?
To: Christos Zoulas <christos@astron.com>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 04/23/2007 17:49:49
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
On Apr 23, 2007, at 17:24, Christos Zoulas wrote:
> In article <68d84cd8d31e0de385edd96ecd39050b@netbsd.org>,
> Michael Lorenz <macallan@netbsd.org> wrote:
>> -----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.
>
> Isn't there a way to tell OF not to use some ranges?
I'm pretty sure there is a way to keep OF from using a given range or
to make it pick ranges for this card anyway but I'm not familiar enough
with OF's inner voodoo to tell right now.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iQEVAwUBRi0p/cpnzkX8Yg2nAQIpbAgAkAhzH8DeJ8sD/x3QcrqqIIj5qU4PKxGY
S89ggt63zb7ZYlwBjP4ruuBc9pPz9riqFS7kbAlHefjwJPMr3v5Rr8I+F73B3qDC
GFSwmaN4fmMmGxh4bs1JXK8gtgkgZAI0hCVfTYaAGom+67E9f9vf/lRuyYv8gRfL
rFhesYZBYbvidzBuwDZ9W7XpGY9na9wF86w0VANNFADf3tBwKYeKDTJERTXU+OTL
C/3PMx1VUEmsuKU8+Z5OvhjiFX0h+77q7SFJfBzASxs6jDfjd74lMaCSdafqCjnb
rafUjITqr64ak0WwFbvOCIiJOh2GMcypPtnEkSzrO4fiCSqEcHEytQ==
=mJaP
-----END PGP SIGNATURE-----