任何 PCI 拓扑中的同一总线上是否可以存在两个相同的设备
根据 PCI 标准,设备根据供应商 ID、设备 ID 和总线号进行识别。相同类型的所有设备都具有相同的供应商 ID 和设备 ID。如果我将两个这样的设备放在同一总线(即总线 0)上。PCI 软件子系统将如何区分这两个设备?
如果这种情况在 PCI 中不可能实现,那么通过 PCI Express Switch 可以实现这种情况吗?
As per the PCI standard, devices are identified on the basis of Vendor Id, Device Id and the bus no. All devices of same type have identical vendor id and device id. If I put two such devices on the same bus say bus 0. How will the PCI Software Subsystem distinguish between the two?
If such a case is not possible in PCI, then can such thing be possible through PCI Express Switch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
PCI 和 PCI Express 设备由总线/设备/功能来标识,系统中的每个设备都必须是唯一的。供应商和设备 ID 只是在特定总线/设备/功能中找到的设备的属性。
枚举板卡时,驱动程序通常会扫描 PCI 配置空间(遍历所有已安装的 PCI 设备),直到找到一个或多个与预期供应商和设备 ID 匹配的设备,也可能与子系统 ID 匹配。一旦找到匹配,它应该将总线/设备/功能记录为打开设备的“句柄”。
正确编写的软件应该找到所有供应商/设备匹配项,将它们放入表格中,然后让您选择要使用的一个(例如 /dev/mydevice0、/dev /mydevice1 等)。然而,我见过一些懒惰的软件在第一次匹配时就停止了。
PCI and PCI Express devices are identified by Bus/Device/Function, which is necessarily unique per device in the system. Vendor and Device ID are just properties of a device found at a certain Bus/Device/Function.
When enumerating board, a driver will typically scan PCI configuration space (iterate through all the installed PCI devices), until it finds one or more devices that match the expected Vendor and Device ID, and possibly also the subsystem IDs. Once it finds a match, it should record the bus/device/function as a "handle" to the open device.
Properly written software should find all vendor/device matches, put them in a table, and let you pick which one you want to use (e.g. /dev/mydevice0, /dev/mydevice1, etc). However, I have seen lazy software that simply stops at the first match.
是的,完全没问题。主机通过槽位来区分相同的设备。
Yes, it's perfectly fine. The host distinguishes identical devices by slot.
据我所知,每个PCI设备都可以通过(Bus,Device,Function)来唯一描述。考虑你的情况(2个设备安装了相同的VID和DID),我认为它们必须位于不同的PCI总线!如果它们必须位于同一总线中,请使其设备或功能编号不同
As I know, each PCI device can be uniquely described by (Bus,Device,Function). Consider your case(2 devices have identical VID and DID installed) and I think they must be located at different PCI bus ! If they must be in the same bus then please make their Device or Function number different