pci access question

William Grzybowski william88 at gmail.com
Sat Apr 25 19:07:33 UTC 2009


Hi,

I was reading some code and running some tests in freebsd and some doubts came out.

I know this is not a school but I would like to ask some questions regarding 8086 architecture and pci access, I really appreciate if someone could answer or point me to some good book.

As far as I can understund the pci controllers have some registers which the cpu can read and write stuff.
Everythings starts with the host pci bridge bus, this bus is define as _BBN in the acpi and is 0 when it is not set. 
Then for every pci controller attached to this bus the interrupt routing table is set so this bridge can control them properly. If any of them is a pci controller of the type pci bridge this process is repeated.

This is how I would describe in a very simple way how the process works with my limited knowledge.

My questions would be:

Does ACPI directly inteferes in how pci regs are accesses somehow or a pci_cfgregread is 100% inpendent just with proper locks and asm inb, inl, inw instructions after setting the bus and slot/func?
How does the bridge discovers the pci controllers attached to the bus? Is there some kind of signal or all possible addresses are tested?
Does the pci bridges need to be initialized by the OS (by initialized i mean set some registers in the controller or something)?

Again, sorry for asking this here, probably not the right place, but I would love any kind of "light", specially a good book about it.


More information about the freebsd-acpi mailing list