在Linux中从用户空间访问pci设备信息 [英] pci device info access in linux from userspace

查看:677
本文介绍了在Linux中从用户空间访问pci设备信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以编程方式从用户空间访问pci设备树信息.就像根联合体和与其相连的设备一样.我该怎么办,请告诉我.

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.

关于, 普拉迪普(Pradeep)

Regards, Pradeep

推荐答案

libpci或pcilib(基于lspci的基础)使用sysfs,procfs以及可能的其他方式来访问PCI信息.您可以检查pciutils软件包的源代码以获取更多参考:

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:

https://github.com/gittup/pciutils

https://github.com/gittup/pciutils/blob/gittup/lspci.c

这篇关于在Linux中从用户空间访问pci设备信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆