views:

85

answers:

1

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?

+1  A: 

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.

John Efstathiades
Thanks, The BSP does call the pciAutoConfig library from VxWorks. This works well when my code is running on the processor in the system slot. Unfortunately for me, I've got a different setup. I'm tacking a test interface to an existing system. My processor is not going in the system slot. Running the pciAutoConfig here hangs the system. I'm reading up the PCI System Architecture book to hopefully find a way to configure my odd topology.
Steve Roe

related questions