Port-ofppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Current EFIKA status?



There's a host controller node in the device tree - that is your base
address.

All PCI controllers as per the PCI standard have two registers for
accessing PCI configuration space; right at this very moment I cannot
remember what they are (and my eBook of the PCI specs is not opening,
damn you Adobe Digital Editions..!!!!) but you can ask for the address
and then read the data out of it. I think it's CF8 (write your
configuration address here) and CFC (read/write your data here, make
sure you do it right when you do word or byte writes as PCI is little
endian and your PowerPC isn't).

The VT8231 southbridge has two of the same registers for reading the
address space of any of it's subdevices.

The behaviour of only responding to one bridge's configuration ports
is as per the PCI specification (as braindead as it seems). This is
to stop bus contention on playing with configuration space, so
effectively PCI Controller 0 (domain 0) will be the only one that
actually responds when you poke CF8 and some offset from CFC. PCI
Controller 1 will quietly snoop the data. The bridges collaborate
to decide if it owns that particular bus number, and which one
should service the data.

Basically this means, what you see is.. the PCI specification at work!

I am certain though that there is a way around it, probably by
*forcing* a Type 1 configuration access (set the low cfgaddr bit to 1,
but a host controller does not need to accept the lower 8 bits!)
rather than letting the bridge decide. This will make it propagate
rather than have PCI Controller 0 decide bus 0 is his. It may also
be within reason to use the 8 reserved bits at the top of the
configuration address to specify the controller..

It's really complicated, if anyone wants to look at the PCI specs
(or some decent reference manual) and confirm this, please do,
also please correct me if I am wrong (I am damn sure I could be,
I have never understood this rubbish :)

--
Matt Sealey <matt%genesi-usa.com@localhost>
Genesi, Manager, Developer Relations

Tim Rightnour wrote:
On 24-Oct-2007 Frank Wille wrote:
Maybe you shouldn't spend too much time on it. It can be used as a fallback
for unknown OFW-architectures, but for the Pegasos everything is known. I
got all the required offsets and tricks.

Do we know?  I tried the indirect pciconf methods and couldn't get anything out
of them.  What addresses do you have for those?

---
Tim Rightnour <root%garbled.net@localhost>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
Genecys: Open Source 3D MMORPG: http://www.genecys.org/



Home | Main Index | Thread Index | Old Index