I want to access the pci device tree information from user space programatically. Like the root complex and the devices connected to it. How can I do it please let me know.
Regards, Pradeep
Advertisement
Answer
libpci or pcilib (on which lspci is based) uses sysfs, procfs, and possibly other means to access PCI information. You can check pciutils package source code for further reference: