
3 Porting a BSP to Custom Hardware
3.3 Finalizing Your BSP
95
3
#ifdef INCLUDE_PCI
sysPciAutoConfig ();
/* prepare BSP support for callouts from supported END driver */
#if defined(INCLUDE_END) && defined(INCLUDE_FEI_END)
sys557PciInit ();
#endif /* defined(INCLUDE_END) && defined(INCLUDE_FEI_END) */
#endif /* INCLUDE_PCI */
To include the PCI support code, #include sysBusPci.c from sysLib.c. As with the
call to sysPciAutoConfig( ), the #include sysBusPci.c line should be surrounded
by #ifdef
INCLUDE_PCI and #endif.
PCI Show Routines
VxWorks provides several utilities to display information about devices on the PCI
bus. These show routines can be used to help diagnose problems with PCI
configuration and driver development.
pciConfigTopoShow( )
The routine pciConfigTopoShow( ) was introduced in VxWorks 5.5. This routine
provides a readable format display of all devices on the PCI bus. For each device,
some basic configuration information is displayed. This includes the
[bus, device, function] tuple, the device type in an alphanumeric format, the
command and status words, and the base address register (BAR) addresses.
Sample output for this routine is as follows:
-> pciConfigTopoShow
[0,0,0] type=UNKNOWN (0x80) BRIDGE
status=0x02b0 ( CAP 66MHZ FBTB DEVSEL=1 )
command=0x0006 ( MEM_ENABLE MASTER_ENABLE )
bar0 in prefetchable 64-bit mem space @ 0x00000000
[0,0,0] type=UNKNOWN (0x80) BRIDGE
status=0x02b0 ( CAP 66MHZ FBTB DEVSEL=1 )
command=0x0006 ( MEM_ENABLE MASTER_ENABLE )
bar0 in prefetchable 64-bit mem space @ 0x00000000
[0,16,0] type=SERIAL BUS
status=0x0210 ( CAP DEVSEL=1 )
command=0x0006 ( MEM_ENABLE MASTER_ENABLE )
bar0 in 32-bit mem space @ 0x80000000
[0,16,1] type=SERIAL BUS
status=0x0210 ( CAP DEVSEL=1 )
command=0x0006 ( MEM_ENABLE MASTER_ENABLE )
bar0 in 32-bit mem space @ 0x80001000
[0,16,2] type=SERIAL BUS
status=0x0210 ( CAP DEVSEL=1 )
command=0x0006 ( MEM_ENABLE MASTER_ENABLE )
Kommentare zu diesen Handbüchern