Hi -
1. I'm sure you're probably familiar with this document:
http://tldp.org/LDP/tlk/dd/pci.html
Note in particular the "PCI Base Address" diagrams
2. Next, look at resource.c in your kernel source:
/usr/src/linux/kernel/resource.c =>
Code:
struct resource ioport_resource = {
.name = "PCI IO",
.start = 0x0000,
.end = IO_SPACE_LIMIT,
.flags = IORESOURCE_IO,
};
EXPORT_SYMBOL(ioport_resource);
...
3. This is a "Linux kernel thing", and not a "PCI thing".
Specifically,
a) The kernel has a "dev" pointer
b) "dev" has an array of "ioport_resources"
c) The macro you cited "knows" the values of start, end, etc based on other (source-configurable) definitions in the kernel.
'Hope that helps ... at least a little ...