location of pci_get_* functions

Sepherosa Ziehau sepherosa at gmail.com
Mon Feb 13 17:38:52 PST 2006


On 2/13/06, Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:
>
> :
> :Ok, I'm feeling very dense. Where are the pci_get_* functions (e.g.
> :pci_get_devid, pci_get_vendor, ...) defined? A 'grep -r pci_get_devid
> :/usr/src' shows all the places this is used, but nothing about the
> :definitions. tnx.
> :
> :---chuck
>
>     It took me HOURS to find those when I first needed to locate them,
>     months ago.
>
>     The answer is:  They are #define'd macros which concactenate
>     the 'pci_get' with '_vendor', and so forth.
>
>     Look on line 209 of sys/bus/pci/pcivar.h.
>
>     Note that DragonFly's PCI assessors work someone differently then
>     FreeBSD's.  I tried to normalize the functions.  It's very confusing

I think our pcib_{get,set}_xxx (PCI bridge configuration register
accessor) is different from FreeBSD's, while pci_{get,set}_xxx is same

>     either way because there are actually three PCI device layers (or more,
>     even).  There's the PCI bus, the PCI slot (which can contain multiple
>     devices), and the PCI device.
>
>                                         -Matt
>                                         Matthew Dillon
>                                         <dillon at xxxxxxxxxxxxx>
>


--
Live Free or Die






More information about the Kernel mailing list