PCI Bus Config
Posted: Fri Mar 06, 2009 7:29 am
Hey,
I've gone through the wiki and some other references i could find on PCI and have a few questions on it.
#1) Am I correct in assuming that there is no function that will return the full topology of the PCI devices in the system and that you basically have to probe it by starting at bus 0 - 255 and every slot/device (0-31) to see if a device is present there and if so what it's vendor and device id is. Then using that you'd know what driver/code to load for it.
#2) Is it correct to ignore BIOS32 and the PCI bios functions and just use the two i/o ports (config address and data)? - I didn't see any other BIOS32 functions that were particularly useful. Or is there other stuff in BIOS32 that is an absolute must have?
#3) The wiki article mentions how to read the config space registers, is the process the same to write to them, would one be able to write to them? (IE: command register).
#4) I presume PCI express is basically identical but there would be something additional in the config space to determine the speed? like x16 etc? Is there any additional work for PCIe ?
Thanks for any info!
John
I've gone through the wiki and some other references i could find on PCI and have a few questions on it.
#1) Am I correct in assuming that there is no function that will return the full topology of the PCI devices in the system and that you basically have to probe it by starting at bus 0 - 255 and every slot/device (0-31) to see if a device is present there and if so what it's vendor and device id is. Then using that you'd know what driver/code to load for it.
#2) Is it correct to ignore BIOS32 and the PCI bios functions and just use the two i/o ports (config address and data)? - I didn't see any other BIOS32 functions that were particularly useful. Or is there other stuff in BIOS32 that is an absolute must have?
#3) The wiki article mentions how to read the config space registers, is the process the same to write to them, would one be able to write to them? (IE: command register).
#4) I presume PCI express is basically identical but there would be something additional in the config space to determine the speed? like x16 etc? Is there any additional work for PCIe ?
Thanks for any info!
John