Question on pci-configuration space

Hi all, Iam working on pci application programming in linux I have Few questions

If i have two pci Devices of same type and same vendor how can i Differentiate two devices? suppose the devices are memory based devices 0-1000address deals 1st memory based device and 1000-2000 deals with 2nd device and same address lines going to the devices How can i differentiate these two devices with the configuration space? what are the things that differs in pci configuration space?

Reply to
srblinux
Loading thread data ...

You can't. Following Linux's device-driver model, both cards are bound to the same driver. Maybe the subvendor ID could help?

But why its important to differ two equal devices?

JB

Reply to
Juergen Beisert

Hi,

I like to know How it is differentiated. usually in Embedded hardware we have a chipselect (cs) to various devices. chipselect is raised to differentiate one device with another. But in Pci model what is the equivalent to chipselect in pci-configuartion space. Thanks in advance, with regards, Bab

Reply to
srblinux

5 lines of pci geographical address give 2^5 (32) addresses. at PCI reset, these lines are used to sniff and identify each device, then pci resources are allocated to each device having being detected. Each device is identified by bus number, device number and function number. These numbers are given by the PCI bus identifying procedure and depend on how the geographic lines are connected/mapped on the physical bus and expansion slots, if any. All you have to do depends on what you rely on :

- if you are at boot up level with existing firmware, you only have to get and read the pci mapping structure updated by the embedded firmware boot procedure, your firmware user guide or programmer guide should give you relevant information about that pci identifying procedure

- if you are writing a boot firmware, long long work to do I suppose...

Reply to
Alain-Pierre CHERTIER

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.