In this page, Figure 6.1 shows an example of PCI configuration, with two buses.
Using Linux (Ubuntu), is it possible to get the PCI configuration of the actual motherboard? I mean: determine how many PCI buses are present, find if there is a PCI-express bus and the bridges, so that one can draw a diagram similar to that Figure 6.1.
lspci
gives a list of the PCI devices, but it does not seem to explicitly show the connections and the buses structure.
Best Answer
dmidecode
andlshw
together provide a reasonable picture.dmidecode
, on a correctly-configured system (i.e. one with correctly-populated DMI tables), will list physical slots and their characteristics. For example, on my system, I see information such asand
The designations can be quite detailed; on this particular board the physical slots and electrical capabilities are correctly identified (e.g.
PCI-E 3.0 X8 (IN X16)
).lshw
indicates the bridge connections, and its information can be matched withdmidecode
's using the bus addresses. This allows motherboard-hosted bridges to be distinguished from adapter-hosted bridges. (For example, one of my systems has two PCI slots on a C226 motherboard, using a PCI bridge on the motherboard; it also has an ATTO SCSI PCI Express HBA which uses two PCI-hosted chips behind another PCI bridge, on the card itself.lshw
's output doesn't make it easy to distinguish the two cases, but combined withdmidecode
's output it's obvious which is which.)