How to configure PCI-to-PCI bridge device in 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(), wh开发者_如何学JAVAere 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?
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.
精彩评论