Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2009 16:08:01 -0300
From:      William Grzybowski <william88@gmail.com>
To:        freebsd-acpi@freebsd.org
Subject:   pci access question
Message-ID:  <20090425190801.GA1150@venon.lostgarden>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090425190801.GA1150>