Technobox Utilities : Technobox VxWorks Utilities

TboxVxWorksUtil [PCI]

NAME

TboxVxWorksUtil [PCI] - Technobox's VxWorks PCI Utilities

ROUTINES

TboxUtilPciAddr( ) - Specifies the PCI I/O and Memory Space Ranges
TboxUtilPciBusShow( ) - Display information for all the PCI Chips
TboxUtilPciBusConfig( ) - Configure all the Technobox Adapters on the PCI Bus
TboxUtilPciBusVerify( ) - Verify correct programming of all the PCI Chips
TboxUtilPciBusMemory( ) - Display a sorted list of memory for all the PCI Chips
TboxUtilPciBusDump( ) - Dump Configuration Space for all the PCI Chips
TboxUtilPciBridgeConfig( ) - Configure a single Bridge on the PCI Bus

TboxUtilPciDeviceMemoryShow( ) - display memory allocation for a single PCI Chip
TboxUtilPciEnableIoAccess( ) - Enables PCI I/O Access to the specified PCI Chip
TboxUtilPciEnableMemAccess( ) - Enables PCI Memory Access to the specified PCI Chip
TboxUtilPciRevision( ) - Print revision of the utilities

DESCRIPTION

The TboxVxWorksUtil utilities provide functions that display PCI Bus information and assist with configuring the PCI Bus. These utilities are broken down into two groups. Those that display information about the PCI Bus and those that assist with configuring the PCI Bus.

These utilities are designed as debugging aids only. They are designed to show the configuration of devices on the PCI Bus, aid in debugging PCI Bus problems, and assist in configuring the PCI Bus. They are not intended to be a run time application. It is recommended to use the output from the utilities to configure the devices in the BSP.

Prior to compiling the utilities, the user must edit the config.h file and change the PCI address definitions and PCI configuration space access macros. You can search for TODO in the config.h file for the sections that must be updated.

The PCI Memory and I/O space starting and ending values must be updated to reflect the actual Base Card values. The utilities use these value when configuring bridge chips and BAR registers to determine valid values. The values that should be programmed are the actual beginning and ending address of the memory region. For instance if you have 0x100000 bytes of memory starting at 0x400000 (0x400000 - 0x4FFFFF) you should program 0x400000 for the starting address and 0x4FFFFF for the ending address. In addition to the address, the user can configure the cache line size and latency timers for all the chips the utilities configures.

The Configuration space macros convert the configuration calls into the functions supported by the user's BSP. Different BSP's use different names for the Configuration Space access functions. These macros allow the user to quickly convert the utilities to the user's BSP. Verify the name and order of the parameters. For Motorola and Force BSP's you should be able to choose appropriate macros.

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciAddr( )

NAME

TboxUtilPciAddr( ) - Specifies the PCI I/O and Memory Space Ranges

SYNOPSIS

STATUS TboxUtilPciAddr
    (
    UINT32 * IoAddrStart,  /* returns user defined address from IOADDRSTART */
    UINT32 * IoAddrEnd,    /* returns user defined address from IOADDREND */
    UINT32 * MemAddrStart, /* returns user defined address from MEMADDRSTART */
    UINT32 * MemAddrEnd    /* returns user defined address from MEMADDREND */
    )

DESCRIPTION

This routine allows the user to specify the PCI I/O and Memory Space Ranges of the Base Card to the Technobox Utilities. The utilities use this routine to determine the actual PCI memory ranges. Failure to correctly setup the memory #define will lead to improper use of the tools. Refer to the Base Card and BSP documentation to determine the valid PCI ranges. Technobox

RETURNS

OK Only.

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciBusShow( )

NAME

TboxUtilPciBusShow( ) - Display information for all the PCI Chips

SYNOPSIS

STATUS TboxUtilPciBusShow( void )

DESCRIPTION

This function displays the following information about each Device in the system:

For Bridge Chips the following Bridge information is also displayed:

NOTE

This function is designed as a debugging aid only. It is designed to show the configuration of devices on the PCI Bus and to aid in debugging PCI Bus problems. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK.

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciBusConfig( )

NAME

TboxUtilPciBusConfig( ) - Configure all the Technobox Adapters on the PCI Bus

SYNOPSIS

STATUS TboxUtilPciBusConfig( void )

DESCRIPTION

This function will allocate and program memory for all the Technobox Adapters on the PCI Bus that are requesting memory and have not been programmed yet. It determines the locations of free space and assigns the memory based on the location of the Adapter (primary bus, behind a Bridge). This function will them enable the Memory or I/O Space accesses in the command register. This function uses the Memory Start and End values specified in the TboxUtilPciAddr function.

This function has the following limitations:

NOTE

This function is designed as a debugging aid only. It is designed to configure Technobox Adapters on the PCI Bus and to aid in setting up the BSP. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

This function is not intended to be a run time application. During configuration, interrupts and tasks may be locked out preventing real time operation. It is recommended that this function be used to aid in setting up the BSP package. Run this function to get possible memory regions, verify those regions are acceptable, and then use those memory regions to have the BSP package setup the device during initialization.

RETURNS

OK, or ERROR if could not get memory, or the Bus was not configured correctly

SEE ALSO

TboxVxWorksUtil, TboxUtilPciBusVerify, TboxUtilPciAddr


Technobox VxWorks Utilities : Routines

TboxUtilPciBusVerify( )

NAME

TboxUtilPciBusVerify( ) - Verify correct programming of all the PCI Chips

SYNOPSIS

STATUS TboxUtilPciBusVerify( void )

DESCRIPTION

This function checks the configuration of all the PCI Chips on the PCI Bus including the Bridge Chips. It checks various settings of the PCI Chips to help locate configuration problems on the PCI Bus. It checks for common problems and is not an exhaustive test. This function uses the Memory Start and End values specified in the TboxUtilPciAddr function.

This function checks for the following:

This function does NOT verify the following:

NOTE

This function is designed as a debugging aid only. It is designed to enable the configuration of devices on the PCI Bus and to aid in installing PCI Devices. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK, or ERROR if could not get memory.

SEE ALSO

TboxVxWorksUtil, TboxUtilPciAddr


Technobox VxWorks Utilities : Routines

TboxUtilPciBusMemory( )

NAME

TboxUtilPciBusMemory( ) - Display a sorted list of memory for all the PCI Chips

SYNOPSIS

STATUS TboxUtilPciBusMemory( void )

DESCRIPTION

This function displays a sorted list of the allocated PCI Bus memory and the device that is assigned that memory.

NOTE

This function is designed as a debugging aid only. It is designed to show the configuration of devices on the PCI Bus and to aid in debugging PCI Bus problems. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK, or ERROR if could not get memory.

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciBusDump( )

NAME

TboxUtilPciBusDump( ) - Dump Configuration Space for all the PCI Chips

SYNOPSIS

STATUS TboxUtilPciBusDump( void )

DESCRIPTION

This function dumps the entire Configuration Space for each PCI Chip

NOTE

This function is designed as a debugging aid only. It is designed to show the configuration of devices on the PCI Bus and to aid in debugging PCI Bus problems. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK.

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciBridgeConfig( )

NAME

TboxUtilPciBridgeConfig( ) - Configure a single Bridge on the PCI Bus

SYNOPSIS

STATUS TboxUtilPciBridgeConfig( void )

DESCRIPTION

This function is designed to help install Technobox Adapters that contain a PCI Bridge Chip onto a configured Base Card. For that reason this function only supports a single new PCI Bridge on the PCI Bus.

This function will scan through the PCI Bus checking for PCI Bridge Chips. It will check for any new PCI Bridge Chips, the Secondary Bus numbering, and whether this function can support the given PCI Bus configuration. This function uses the Memory Start and End values specified in the TboxUtilPciAddr function.

This function will insert a single PCI Bridge Chip. It will assign Secondary Bus numbering and assign a Memory Window to this device. If the new Bridge is behind another Bridge it will attempt to place it's Memory Window within the Parents Memory Window. It will correct the Secondary Bus numbering in a depth first scheme after the new device is added.

This function has the following limitations:

NOTE

This function is designed as a debugging aid only. It is designed to configure Technobox Adapters on the PCI Bus and to aid in setting up the BSP. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

This function is not intended to be a run time application. During configuration, interrupts and tasks may be locked out preventing real time operation. It is recommended that this function be used to aid in setting up the BSP package. Run this function to get possible memory regions, verify those regions are acceptable, and then use those memory regions to have the BSP package setup the device during initialization.

RETURNS

OK.

SEE ALSO

TboxVxWorksUtil, TboxUtilPciAddr


Technobox VxWorks Utilities : Routines

TboxUtilPciDeviceMemoryShow( )

NAME

TboxUtilPciDeviceMemoryShow( ) - display memory allocation for a single PCI Chip

SYNOPSIS

STATUS TboxUtilPciDeviceMemoryShow
    (
    UINT32 Bus,     /* Bus Number for this PCI Chip */
    UINT32 Device,  /* Device Number for this PCI Chip */
    UINT32 Function /* Function Number for this PCI Chip */
    )

DESCRIPTION

Get all the memory information about this PCI Device and print it. This includes both allocated and requested memory. If there is no memory associated with this device nothing is displayed. It is not recommended that the user call this function. Instead use the TboxUtilPciBusShow which displays more details about every device.

The Bus parameter specifies the Bus Number for this device.

The Device parameter specifies the Device Number for this device (Valid values are 0 to 31).

The Function parameter specifies the Function Number for this device (Valid values are 0 for non-multifunction devices and 0 to 7 for multifunction devices).

NOTE

This function is designed as a debugging aid only. It is designed to enable the configuration of devices on the PCI Bus and to aid in installing PCI Devices. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK, or ERROR if the specified Device does not exist

SEE ALSO

TboxVxWorksUtil, TboxUtilPciBusShow


Technobox VxWorks Utilities : Routines

TboxUtilPciEnableIoAccess( )

NAME

TboxUtilPciEnableIoAccess( ) - Enables PCI I/O Access to the specified PCI Chip

SYNOPSIS

STATUS TboxUtilPciEnableIoAccess
    (
    UINT32 Bus,     /* Bus Number for this PCI Chip */
    UINT32 Device,  /* Device Number for this PCI Chip */
    UINT32 Function /* Function Number for this PCI Chip */
    )

DESCRIPTION

This function simply sets the I/O Space Enable bit in the Command Register

The Bus parameter specifies the Bus Number for this PCI Chip.

The Device parameter specifies the Device Number for this PCI Chip (Valid values are 0 to 31).

The Function parameter specifies the Function Number for this PCI Chip (Valid values are 0 for non-multifunction devices and 0 to 7 for multifunction devices).

NOTE

This function is designed as a debugging aid only. It is designed to enable the configuration of devices on the PCI Bus and to aid in installing PCI Devices. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK, or ERROR if the specified Device does not exist

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciEnableMemAccess( )

NAME

TboxUtilPciEnableMemAccess( ) - Enables PCI Memory Access to the specified PCI Chip

SYNOPSIS

STATUS TboxUtilPciEnableMemAccess
    (
    UINT32 Bus,     /* Bus Number for this PCI Chip */
    UINT32 Device,  /* Device Number for this PCI Chip */
    UINT32 Function /* Function Number for this PCI Chip */
    )

DESCRIPTION

This function simply sets the Memory Space Enable bit in the Command Register

The Bus parameter specifies the Bus Number for this PCI Chip.

The Device parameter specifies the Device Number for this PCI Chip (Valid values are 0 to 31).

The Function parameter specifies the Function Number for this PCI Chip (Valid values are 0 for non-multifunction devices and 0 to 7 for multifunction devices).

NOTE

This function is designed as a debugging aid only. It is designed to enable the configuration of devices on the PCI Bus and to aid in installing PCI Devices. It is not intended to be a run time application. This function is provided as is. While every effort has been made to ensure the accuracy of this function, Technobox does not guarantee the results.

RETURNS

OK, or ERROR if the specified Device does not exist

SEE ALSO

TboxVxWorksUtil


Technobox VxWorks Utilities : Routines

TboxUtilPciRevision( )

NAME

TboxUtilPciRevision( ) - Print revision of the utilities

SYNOPSIS

STATUS TboxUtilPciRevision( void )

DESCRIPTION

This function simply prints the revision of the utilities

SEE ALSO

TboxVxWorksUtil