PDA

View Full Version : how does macro to get base address register in configuration space works



jamesbon
November 22nd, 2010, 04:05 AM
I am trying to understand working of pci_resource_start function
So I browsed code via cscope and searched for string pci_resource_start
and got following in pci.h


#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)


I am not able to understand how does this above macro works.
How does it above macro gets appropriate base address register in
configuration space?