Why PCI device had separate configuration space and memory/IO mapped space?
I had worked on pci driver but still don't know why PCI/PCIe devices have separate pci configuration space and memory/IO mapped address space?
Why can't this can be a single device address space?
Is there any hardware limitations in PCI cause different address space?
Please let me know.
Disclaimer: I know about zero about PCI ;) But as I see it
You actually can't have the configuration space in one of the other spaces. The memory / IO space does not have a base address at the moment that the system boots up so can't be accessed. Therefore you also can't access the configuration space to do whatever has to be done (read IDs, set base address) if you have a single device address space that includes the configuration space. Also, at boot time it's unknow if the device will use IO mapped IO or memory mapped IO; so in which space should it be placed?
Also note that, although the configuration space is implemented on the PCI card, it's actually addressed based on slot. E.g. the addresses for the configuration space for a card in slot 1 is baseaddress + 0..255, for a card in slot 2 is baseaddress + 256..511 etc. I think (but I'm not sure) it works slightly different from this, but it gives the basic idea.
The reading that I did:
Note: one can think of other implementations where the addresses of a card in slot N depend on the amount of space required by the card in slot N-1.
Hope this helps a little.
|All times are GMT -5. The time now is 08:24 AM.|