Scanning PCI devices
Posted: Thu Feb 09, 2017 2:12 am
I am trying to understand the PCI spec to write my PCI driver. I am having a couple of questions:
1) For probing the pci devices mainly 4 things are important, Bus_Number, Device_Number, Function_Number and Register_Number. Do I have to go to every device and look at the Vendor_ID which is not 0xFFFFFFFF. Do I have to do it for every 255 buses.
2) What if we try to set the Vendor_ID to a specific value (I am right now trying it in a virtualized environment). How do we use the ports 0xCF8 & 0xCFC?
I couldn't find a good resource which explains PCI spec and give some demo code. I find out http://members.hyperlink.net.au/~chart/pci.htm but the site seems down.
1) For probing the pci devices mainly 4 things are important, Bus_Number, Device_Number, Function_Number and Register_Number. Do I have to go to every device and look at the Vendor_ID which is not 0xFFFFFFFF. Do I have to do it for every 255 buses.
2) What if we try to set the Vendor_ID to a specific value (I am right now trying it in a virtualized environment). How do we use the ports 0xCF8 & 0xCFC?
I couldn't find a good resource which explains PCI spec and give some demo code. I find out http://members.hyperlink.net.au/~chart/pci.htm but the site seems down.