前提:对PCIe协议有一定了解,对PCIe设备有基本的认识
目的:通过PCIe设备的Vendor ID、 Device ID、Subsystem Vendor ID、Subsystem Device ID确定一张PCIe卡,供程序自动识别设备和使用
优点:无需通过各设备的关键字适配兼容
相关:(1)linux环境下通过lspci查看PCIe设备的信息
(2)linux环境下通过dmidecode查看PCI槽位信息
内容:
1. 通过lspci查看特定设备的信息:图中红色方框依次为:Vendor ID、 Device ID、Subsystem Vendor ID、Subsystem Device ID(with
lowercase letters ),即Vendor ID:0x1000 , Device ID: 0x0086 , Subsystem Vendor ID: 0x1000 , Subsystem Device ID: 0x0086

2. PCIe Configuration Space 定义,

3. 可以在Linux系统的/usr/share/hwdata/pci.ids文件中找对应的设备信息(该文件也可以自行更新到最新版本, 该文件为开源文件)


4. 下载最新pci.ids文件官网:http://pci-ids.ucw.cz/, 直接查看路径:http://pci-ids.ucw.cz/v2.2/pci.ids

5. PCIe信息维护官网:http://pci-ids.ucw.cz/read/PD



6. 一张PCIe设备属于哪种类型设备:图中红线箭头 0x0107即上图中的:Device subclass 01:07, 代表该总线下挂载的设备为存储类型设备

网友评论