Hey,
For anyone that is interested while building up my pci vendor device id db, i've used the linux code base as well as pcidatabase.com.. (which isn't very complete).. I found another site.. listing.driveragent.com/[vendorid]/ which provides a more extensive detailed list of device ids... quite helpful.
PCI devices and enumeration
Re: PCI devices and enumeration
I have some questions regarding the pci config mechanism, for some reason the multi-function bit never seems to work.. if i manually probe all 8 functions per device everything is 100%, i can tell exactly which functions are implemented and their device id/vendor ids.. but it seems silly to have to do that when i should be able to check the MF flag first? anyone had issues with that?
Also, how would one tell if the device is pcie or x as opposed to pci std, as all types respond to the normal i/o config mechanism and as well through the mcfg enhanced mechanism, you'd need to know what type it is?
Also, how would one tell if the device is pcie or x as opposed to pci std, as all types respond to the normal i/o config mechanism and as well through the mcfg enhanced mechanism, you'd need to know what type it is?
Re: PCI devices and enumeration
PCIe & PCI-X are found thru "Capabilities pointer" at offset 34h.
I enumerate all 8 functions too and you don't need additional code to check Multi function devs. But you better ask BIOS whats the largest bus number.
<pointers for illegal downloads removed -Combuster> - you get the idea.
I enumerate all 8 functions too and you don't need additional code to check Multi function devs. But you better ask BIOS whats the largest bus number.
<pointers for illegal downloads removed -Combuster> - you get the idea.
Re: PCI devices and enumeration
Thanks,
I'm just enumerating all 255 busses as the whole process is still sub-second, I'm not sure if there's anything wrong with doing that?
Eventually I'll need to add support to check for multi-segment pci too.. but I've not found a machine that uses more than 256 busses
I'm just enumerating all 255 busses as the whole process is still sub-second, I'm not sure if there's anything wrong with doing that?
Eventually I'll need to add support to check for multi-segment pci too.. but I've not found a machine that uses more than 256 busses
Re: PCI devices and enumeration
Once enumerated are there any other steps that need to happen before being able to read the BAR(n) registers to get the mem and io space addresses? (for now I don't need to re-map these) - Im guessing that the BAR registers should already have been configured by post/bios ? - When i try read them all i get is 0000 0000
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Re: PCI devices and enumeration
Are you sure you are doing it the right way?
All should be fine from there i think so....
All should be fine from there i think so....
Re: PCI devices and enumeration
I think so, I can read any of the values up to 0ch..
so |class code| subclass | revision id| returns correctly.. and the |bist|header|latency timer|cache size| then from 10h up everything I read is 0...
so |class code| subclass | revision id| returns correctly.. and the |bist|header|latency timer|cache size| then from 10h up everything I read is 0...
Re: PCI devices and enumeration
I think it seems to be working, the devices I was looking at don't seem to use any resources, so no mem ranges or io ranges.. (they were mostly hubs / ctrls etc).
When I ran it on the real h/w all the devices like network, video, sound all come back with proper values for mem-ranges and io.
When I ran it on the real h/w all the devices like network, video, sound all come back with proper values for mem-ranges and io.