working with PCI config registers (extensively)

Andriy Gapon avg at icyb.net.ua
Fri Jun 9 09:45:19 UTC 2006


on 09/06/2006 08:35 M. Warner Losh said the following:
> In message: <4487045F.4000301 at icyb.net.ua>
>             Andriy Gapon <avg at icyb.net.ua> writes:
> : 
> : I am writing a driver for some PCI hardware that does not have any IO
> : ports or IO memory (and thus does not have any useful BARs), but rather
> : it is controlled and communicated with by writes and reads of certain
> : vendor-specific PCI configuration registers.
[snip]
> The PCI bus will write to the standard TYPE 0 headers of a device on
> the pci bus to manage it.  All other configuration registers are the
> responsibility of the driver.  The driver can also access the
> registers that the pci bus manages, but care must be taken.  Sounds
> like there'd be no conflict for you.

Warner,

thank you. There is another peculiarity in my driver - it actually works
with PCI configuration space of a HW device that is "owned" by other
driver/bus, hostb actually. That is, I discover my device using
pci_find_bsf().
But I think that there should be no problem as the registers that my
driver uses should be of no interest to hostb.

P.S. here is more information and link to the source code of my driver:
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=188288+0+current/freebsd-acpi

-- 
Andriy Gapon


More information about the freebsd-hackers mailing list