[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How and where lspci utility gathers information about hardware components?



On 10/27/2013 1:18 PM, Martin T wrote:

> lspci utility shows information regarding devices on various buses like PCI
> or PCI Express. For example on IBM ThinkPad T42 laptop:
[snip]

> Am I correct that lspci uses SMBus which is present both on PCI and PCI
> Express? In addition, how are the model numbers detected? 

SMBUS is not required.  Once the PCI driver loads it scans all devices
on the PCI bus or host bridge controller, collecting the PCI device
vendor/model data during this enumeration process, along with
programming/initializing each device, and then populates

/sys/bus/pci/devices/0000:00:xx.x/vendor
/sys/bus/pci/devices/0000:00:xx.x/device

which are read by lspci.

> For example Intel
> Corporation PRO/Wireless 2915ABG Wi-Fi adapter. Is there a small
> non-volatile memory on each device which stores information about
> particular hardware device?

No, these IDs are hard coded in PCI device registers, which is why each
ID is exactly 4 bytes in length.  PCI ID is part of the PCI standard,
part of the PCI Configuration Space.  lspci cross references the vendor
and device IDs in /sys/bus/pci/../ with the PCI ID table to give you the
detailed device information.  See:  http://pciids.sourceforge.net/

Example:
http://pci-ids.ucw.cz/read/PC/8086

-- 
Stan



Reply to: