In my system, I’ve plugged in two PCI cads which provided by the same vendor and are the same model. So How can I identify this two boards in my application program and can tell which board is in which PCI slot?
This is kind of a grey area. The pci server enumerates the pci bus by bus/ device / function number. The first device it finds with a particular vendor / deviceid is given a pci index of 0, the second an index of 1, etc.
The point is for a particular configuration, you should be able to figure out which card is which by the pci index. The caveat is that if you move the cards around, the ordering may change.
So, you can uniquely identify each card by vendorid / deviceid / pci index. You can also uniqueuely identify each card by bus / device / function number. You’ll have to figure out which card is which index by experimenting.
Hopefully this helps,
On QNX4 (I guess it should work with QNX6) it’s possible to find the slot number in the irq routing table. However slot assignement doesn’t match physical location.
I am playing with a 12 PCI slot backplane and assignemetn is CPU-5-4-3-10-11-12-9-8-7…