如何在VxWorks中配置PCI-to-PCI桥接设备?
我正在使用 VxWorks 中的板支持包(BSP),它使用 pciAutoConfig() 来配置 PCI 总线。当我将以太网控制器卡添加到总线时,pci 显示例程不显示该卡。
使用总线分析仪,我发现以太网适配器实际上由 PCI 到 PCI 桥接器组成,桥接器后面有两个以太网控制器。看来 BSP 没有正确处理以太网控制器包含的 PCI 到 PCI 桥接器。
我的问题是,我应该查看哪些库和配置来配置 PCI 至 PCI 桥接器?我认为这些调用将进入 sysHwInit(),即现有的 pciAutoConfig() 调用所在的位置。
pciAutoCfgCtl() 有一个 PCI_BRIDGE_PRE_CONFIG_FUNC_SET 参数,该参数指向用户定义的函数来配置总线。这是唯一的方法吗?或者 VxWorks 库中有什么东西可以帮我做到这一点?
I'm working with board support package (BSP) in VxWorks that uses pciAutoConfig() to configure the PCI bus. When I add an Ethernet controller card to the bus the pci display routines do not show the card.
Using a bus analyzer I discovered that the Ethernet adapter actually consists of a PCI-to-PCI bridge with two Ethernet controllers behind the bridge. It appears that the BSP is not properly dealing with the PCI-to-PCI bridge that the Ethernet controller contains.
My question is, what library and configurations should I look at to configure the PCI-to-PCI bridge? I'm thinking these calls will go in sysHwInit(), where the existing pciAutoConfig() calls are.
pciAutoCfgCtl() has a PCI_BRIDGE_PRE_CONFIG_FUNC_SET parameter that points to a user defined function to configure the bus. Is this the only method? Or is there something in the VxWorks libraries that can do this for me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为查看特定于 BSP 的 PCI 自动配置例程是正确的方法。
您的网卡上的 PCI 到 PCI 桥是否被正确枚举?主窗口和辅助窗口有意义吗?是否有足够的整体 PCI 内存空间来包含以太网控制器芯片所在的辅助总线所需的空间?如果不是,您可能需要增加 PCI_MEMIO32_SIZE_SET 值。
如果适配器卡上桥的枚举不正确,您应该能够通过向 BSP 的 sysPciAutoconfigPreEnumBridgeInit() 例程添加代码来手动配置桥。
BSP 是否提供 sysPciAutoconfigInclude() 例程,默认情况下将枚举网络适配器上的以太网控制器设备?如果没有,您将必须向其中添加以太网控制器设备,否则它们将在枚举周期期间被忽略。
I think looking at the BSP-specific PCI auto-configuration routines is the way to go.
Is the PCI-to-PCI bridge on your network card being enumerated properly? Do the primary and secondary windows make sense? Is there enough overall PCI memory space to include the space required for the secondary bus on which the Ethernet controller chips are located? If not you may need to increase the PCI_MEMIO32_SIZE_SET value.
If the enumeration of the bridge on the adapter card is not correct you should be able to manually configure the bridge by adding code to the BSP's sysPciAutoconfigPreEnumBridgeInit() routine.
Does the BSP provide a sysPciAutoconfigInclude() routine which will enumerate the Ethernet controller devices on the network adapter by default? If not you will have to add the Ethernet controller devices to it otherwise they will be ignored during the enumeration cycle.