VxWorks BSP Reference : mbx860

sysLib [mbx860]

NAME

sysLib [mbx860] - Motorola MBX860 board system-dependent library

ROUTINES

pciConfigLibInit( ) - initialize the configuration access-method and addresses
pciFindDevice( ) - find the nth device with the given device & vendor ID
pciFindClass( ) - find the nth occurence of a device by PCI class code.
pciDevConfig( ) - configure a device on a PCI bus
pciConfigBdfPack( ) - pack parameters for the Configuration Address Register
pciConfigExtCapFind( ) - find extended capability in ECP linked list
pciConfigInByte( ) - read one byte from the PCI configuration space
pciConfigInWord( ) - read one word from the PCI configuration space
pciConfigInLong( ) - read one longword from the PCI configuration space
pciConfigOutByte( ) - write one byte to the PCI configuration space
pciConfigOutWord( ) - write one 16-bit word to the PCI configuration space
pciConfigOutLong( ) - write one longword to the PCI configuration space
pciConfigModifyLong( ) - Perform a masked longword register update
pciConfigModifyWord( ) - Perform a masked longword register update
pciConfigModifyByte( ) - Perform a masked longword register update
pciSpecialCycle( ) - generate a special cycle with a message
pciConfigForeachFunc( ) - check condition on specified bus
pciConfigReset( ) - disable cards for warm boot
pciDeviceShow( ) - print information about PCI devices
pciHeaderShow( ) - print a header of the specified PCI device
pciFindDeviceShow( ) - find a device by deviceId, then print an information.
pciFindClassShow( ) - find a device by 24-bit class code
pciConfigStatusWordShow( ) - show the decoded value of the status word
pciConfigCmdWordShow( ) - show the decoded value of the command word
pciConfigFuncShow( ) - show configuration details about a function
pciConfigTopoShow( ) - show PCI topology
sysSerialHwInit( ) - initialize the BSP serial devices to a quiesent state
sysSerialHwInit2( ) - connect BSP serial device interrupts
sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel
sysSerialReset( ) - reset the serial device
ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series
sysClkConnect( ) - connect a routine to the system clock interrupt
sysClkEnable( ) - turn on system clock interrupts
sysClkDisable( ) - turn off system clock interrupts
sysClkRateGet( ) - get the system clock rate
sysClkRateSet( ) - set the system clock rate
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
mbxI2cConfigParamsGet( ) - get the board configuration parameters out of SROM
mbxI2cMemcConfig( ) - configure the MEMC registers
qspanHostInit( ) - initialize the QSpan PCIBus bridge controller
qspanRegMap( ) - map QSPAN registers
qspanSlaveImageSet( ) - setup a PCI slave image
qspanTargetImageSet( ) - setup a PCI target image
qspanHostEnable( ) - enable the bridge
qspanHostReset( ) - reset the QSpan PCIBus bridge controller
sysIbcPciExtInit( ) - initialize the extended portion of the IBC PCI header
sysIbcInit( ) - Initialize the IBC
sysIbcIntConnect( ) - connect an interrupt handler to the system vector table
sysIbcIntEnable( ) - enable a IBC interrupt level
sysIbcIntDisable( ) - disable a IBC interrupt level
sysIbcIntHandler( ) - handler of the sl82565 IBC interrupt.
smcC67Init( ) - initialize the Super I/O chip
i2cMcp( ) - download RISC microcode patch
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the bsp version with the revision eg 1.0/x
sysClkRateAdjust( ) - Adjust the clock frequency
sysHwInit( ) - initialize the system hardware
sysPciCfgRead( ) - read longword from PCI configuration space
sysPciCfgWrite( ) - write longword to PCI configuration space
sysPhysMemTop( ) - get the address of the top of physical memory
sysMemTop( ) - get the address of the top of VxWorks memory
sysToMonitor( ) - transfer control to the ROM monitor
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
sysLocalToBusAdrs( ) - convert a local address to a bus address
sysBusToLocalAdrs( ) - convert a bus address to a local address
sysBusTas( ) - test and set a location across the bus
sysBusClearTas( ) - test and clear
sysCpmEnetDisable( ) - disable the Ethernet controller
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
sysCpmEnetEnable( ) - enable the Ethernet controller
sysCpmEnetAddrGet( ) - get the hardware Ethernet address
sysCpmEnetCommand( ) - issue a command to the Ethernet interface controller
sysCpmEnetIntEnable( ) - enable the Ethernet interface interrupt
sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt
sysPciTrap( ) - trap handler for PCI exception
sysMsDelay( ) - delay for the specified amount of time (MS)
sysIntEnablePIC( ) - enable an ISA/PCI interrupt
sysDelay( ) - delay for approx. 1ms
sysAtaInit( ) - initialize the EIDE/ATA interface
sysInByteString( ) - reads a string of bytes from an io address.
sysOutByteString( ) - writes a string of bytes to an io address.
sysInWordString( ) - reads a string of words from an io address.
sysInWordStringRev( ) - byte reversed word read.
sysOutWordString( ) - writes a string of words to an io address.
sysInLongString( ) - reads a string of longwords from an io address.
sysOutLongString( ) - writes a string of longwords to an io address.

DESCRIPTION

This library provides board-specific routines. The chip drivers included are:

    ppc860Timer.c       - PowerPC Decrementer Timer library + 860 timers.
    ppcDecTimer.c       - PowerPC Decrementer Timer library.
    byteNvRam.c         - NVRAM access routines
    mbxI2c.c            - I2C bus access
    qspanPci.c          - QSPAN PCI bus bridge device
    w83c553f.c          - ISA interrupt controller
    smcC67SuperIo.c     - Super I/O chip initialization
    i2cMcp.c            - I2C micro-chip patch
    ataDrv.c            - IDE/ATA driver
    mbxPcmcia.c         - PCMCIA support
    mbxLptDrv.c         - Parallel port driver
    fdcDrv.c            - Floppy driver

INCLUDE FILES

sysLib.h

SEE ALSO

VxWorks Programmer's Guide: Configuration


mbx860 : Routines

pciConfigLibInit( )

NAME

pciConfigLibInit( ) - initialize the configuration access-method and addresses

SYNOPSIS

STATUS pciConfigLibInit
    (
    int   mechanism,          /* configuration mechanism: 0, 1, 2 */
    ULONG addr0,              /* config-addr-reg / CSE-reg */
    ULONG addr1,              /* config-data-reg / Forward-reg */
    ULONG addr2               /* none / Base-address */
    )

DESCRIPTION

This routine initializes the configuration access-method and addresses.

Configuration mechanism one utilizes two 32-bit IO ports located at addresses 0x0cf8 and 0x0cfc. These two ports are:

P"
32-bit configuration address port, at 0x0cf8
P"
32-bit configuration data port, at 0x0cfc

Accessing a PCI function's configuration port is two step process.

P"
Write the bus number, physical device number, function number and register number to the configuration address port.
P"
Perform an IO read from or an write to the configuration data port.

Configuration mechanism two uses following two single-byte IO ports.

P"
Configuration space enable, or CSE, register, at 0x0cf8
P"
Forward register, at 0x0cfa

To generate a PCI configuration transaction, the following actions are performed.

-
Write the target bus number into the forward register.
-
Write a one byte value to the CSE register at 0x0cf8. The bit pattern written to this register has three effects: disables the generation of special cycles; enables the generation of configuration transactions; specifies the target PCI functional device.
-
Perform a one, two or four byte IO read or write transaction within the IO range 0xc000 through 0xcfff.
* Configuration mechanism zero is for non-PC/PowerPC environments where an area of address space produces PCI configuration transactions. No support for special cycles is included.

RETURNS

OK, or ERROR if a mechanism is not 0, 1, or 2.

SEE ALSO

sysLib


mbx860 : Routines

pciFindDevice( )

NAME

pciFindDevice( ) - find the nth device with the given device & vendor ID

SYNOPSIS

STATUS pciFindDevice
    (
    int   vendorId,           /* vendor ID */
    int   deviceId,           /* device ID */
    int   index,              /* desired instance of device */
    int * pBusNo,             /* bus number */
    int * pDeviceNo,          /* device number */
    int * pFuncNo             /* function number */
    )

DESCRIPTION

This routine finds the nth device with the given device & vendor ID.

RETURNS

OK, or ERROR if the deviceId and vendorId didn't match.

SEE ALSO

sysLib


mbx860 : Routines

pciFindClass( )

NAME

pciFindClass( ) - find the nth occurence of a device by PCI class code.

SYNOPSIS

STATUS pciFindClass
    (
    int   classCode,          /* 24-bit class code */
    int   index,              /* desired instance of device */
    int * pBusNo,             /* bus number */
    int * pDeviceNo,          /* device number */
    int * pFuncNo             /* function number */
    )

DESCRIPTION

This routine finds the nth device with the given 24-bit PCI class code (class subclass prog_if).

The classcode arg of must be carfully constructed from class and sub-class macros.

Example : To find an ethernet class device, construct the classcode arg as follows:

    ((PCI_CLASS_NETWORK_CTLR << 16 | PCI_SUBCLASS_NET_ETHERNET << 8))

RETURNS

OK, or ERROR if the class didn't match.

SEE ALSO

sysLib


mbx860 : Routines

pciDevConfig( )

NAME

pciDevConfig( ) - configure a device on a PCI bus

SYNOPSIS

STATUS pciDevConfig
    (
    int    pciBusNo,          /* PCI bus number */
    int    pciDevNo,          /* PCI device number */
    int    pciFuncNo,         /* PCI function number */
    UINT32 devIoBaseAdrs,     /* device IO base address */
    UINT32 devMemBaseAdrs,    /* device memory base address */
    UINT32 command            /* command to issue */
    )

DESCRIPTION

This routine configures a device that is on a Peripheral Component Interconnect (PCI) bus by writing to the configuration header of the selected device.

It first disables the device by clearing the command register in the configuration header. It then sets the I/O and/or memory space base address registers, the latency timer value and the cache line size. Finally, it re-enables the device by loading the command register with the specified command.

NOTE

This routine is designed for Type 0 PCI Configuration Headers ONLY. It is NOT usable for configuring, for example, a PCI-to-PCI bridge.

RETURNS

OK always.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigBdfPack( )

NAME

pciConfigBdfPack( ) - pack parameters for the Configuration Address Register

SYNOPSIS

int pciConfigBdfPack
    (
    int busNo,                /* bus number */
    int deviceNo,             /* device number */
    int funcNo                /* function number */
    )

DESCRIPTION

This routine packs three parameters into one integer for accessing the Configuration Address Register

RETURNS

packed integer encoded version of bus, device, and function numbers.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigExtCapFind( )

NAME

pciConfigExtCapFind( ) - find extended capability in ECP linked list

SYNOPSIS

STATUS pciConfigExtCapFind
    (
    UINT8   extCapFindId,     /* Extended capabilities ID to search for */
    int     bus,              /* PCI bus number */
    int     device,           /* PCI device number */
    int     function,         /* PCI function number */
    UINT8 * pOffset           /* returned config space offset */
    )

DESCRIPTION

This routine searches for an extended capability in the linked list of capabilities in config space. If found, the offset of the first byte of the capability of interest in config space is returned via pOffset.

RETURNS

OK if Extended Capability found, ERROR otherwise

SEE ALSO

sysLib


mbx860 : Routines

pciConfigInByte( )

NAME

pciConfigInByte( ) - read one byte from the PCI configuration space

SYNOPSIS

STATUS pciConfigInByte
    (
    int     busNo,            /* bus number */
    int     deviceNo,         /* device number */
    int     funcNo,           /* function number */
    int     offset,           /* offset into the configuration space */
    UINT8 * pData             /* data read from the offset */
    )

DESCRIPTION

This routine reads one byte from the PCI configuration space

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigInWord( )

NAME

pciConfigInWord( ) - read one word from the PCI configuration space

SYNOPSIS

STATUS pciConfigInWord
    (
    int      busNo,           /* bus number */
    int      deviceNo,        /* device number */
    int      funcNo,          /* function number */
    int      offset,          /* offset into the configuration space */
    UINT16 * pData            /* data read from the offset */
    )

DESCRIPTION

This routine reads one word from the PCI configuration space

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigInLong( )

NAME

pciConfigInLong( ) - read one longword from the PCI configuration space

SYNOPSIS

STATUS pciConfigInLong
    (
    int      busNo,           /* bus number */
    int      deviceNo,        /* device number */
    int      funcNo,          /* function number */
    int      offset,          /* offset into the configuration space */
    UINT32 * pData            /* data read from the offset */
    )

DESCRIPTION

This routine reads one longword from the PCI configuration space

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigOutByte( )

NAME

pciConfigOutByte( ) - write one byte to the PCI configuration space

SYNOPSIS

STATUS pciConfigOutByte
    (
    int   busNo,              /* bus number */
    int   deviceNo,           /* device number */
    int   funcNo,             /* function number */
    int   offset,             /* offset into the configuration space */
    UINT8 data                /* data written to the offset */
    )

DESCRIPTION

This routine writes one byte to the PCI configuration space.

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigOutWord( )

NAME

pciConfigOutWord( ) - write one 16-bit word to the PCI configuration space

SYNOPSIS

STATUS pciConfigOutWord
    (
    int    busNo,             /* bus number */
    int    deviceNo,          /* device number */
    int    funcNo,            /* function number */
    int    offset,            /* offset into the configuration space */
    UINT16 data               /* data written to the offset */
    )

DESCRIPTION

This routine writes one 16-bit word to the PCI configuration space.

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigOutLong( )

NAME

pciConfigOutLong( ) - write one longword to the PCI configuration space

SYNOPSIS

STATUS pciConfigOutLong
    (
    int    busNo,             /* bus number */
    int    deviceNo,          /* device number */
    int    funcNo,            /* function number */
    int    offset,            /* offset into the configuration space */
    UINT32 data               /* data written to the offset */
    )

DESCRIPTION

This routine writes one longword to the PCI configuration space.

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigModifyLong( )

NAME

pciConfigModifyLong( ) - Perform a masked longword register update

SYNOPSIS

STATUS pciConfigModifyLong
    (
    int    busNo,             /* bus number */
    int    deviceNo,          /* device number */
    int    funcNo,            /* function number */
    int    offset,            /* offset into the configuration space */
    UINT32 bitMask,           /* Mask which defines field to alter */
    UINT32 data               /* data written to the offset */
    )

DESCRIPTION

This function writes a field into a PCI configuration header without altering any bits not present in the field. It does this by first doing a PCI configuration read (into a temporary location) of the PCI configuration header word which contains the field to be altered. It then alters the bits in the temporary location to match the desired value of the field. It then writes back the temporary location with a configuration write. All configuration accesses are long and the field to alter is specified by the "1" bits in the bitMask parameter.

Be careful to using pciConfigModifyLong for updating the Command and status register. The status bits must be written back as zeroes, else they will be cleared. Proper use involves including the status bits in the mask value, but setting their value to zero in the data value.

The following example will set the PCI_CMD_IO_ENABLE bit without clearing any status bits. The macro PCI_CMD_MASK includes all the status bits as part of the mask. The fact that PCI_CMD_MASTER doesn't include these bits, causes them to be written back as zeroes, therefore they aren't cleared.

   pciConfigModifyLong (b,d,f,PCI_CFG_COMMAND,
                (PCI_CMD_MASK | PCI_CMD_IO_ENABLE), PCI_CMD_IO_ENABLE);
Use of explicit longword read and write operations for dealing with any register containing "write 1 to clear" bits is sound policy.

RETURNS

OK if operation succeeds, ERROR if operation fails.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigModifyWord( )

NAME

pciConfigModifyWord( ) - Perform a masked longword register update

SYNOPSIS

STATUS pciConfigModifyWord
    (
    int    busNo,             /* bus number */
    int    deviceNo,          /* device number */
    int    funcNo,            /* function number */
    int    offset,            /* offset into the configuration space */
    UINT16 bitMask,           /* Mask which defines field to alter */
    UINT16 data               /* data written to the offset */
    )

DESCRIPTION

This function writes a field into a PCI configuration header without altering any bits not present in the field. It does this by first doing a PCI configuration read (into a temporary location) of the PCI configuration header word which contains the field to be altered. It then alters the bits in the temporary location to match the desired value of the field. It then writes back the temporary location with a configuration write. All configuration accesses are long and the field to alter is specified by the "1" bits in the bitMask parameter.

Do not use this routine to modify any register that contains write 1 to clear type of status bits in the same longword. This specifically applies to the command register. Modify byte operations could potentially be implemented as longword operations with bit shifting and masking. This could have the effect of clearing status bits in registers that aren't being updated. Use pciConfigInLong and pciConfigOutLong, or pciModifyLong, to read and update the entire longword.

RETURNS

OK if operation succeeds. ERROR if operation fails.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigModifyByte( )

NAME

pciConfigModifyByte( ) - Perform a masked longword register update

SYNOPSIS

STATUS pciConfigModifyByte
    (
    int   busNo,              /* bus number */
    int   deviceNo,           /* device number */
    int   funcNo,             /* function number */
    int   offset,             /* offset into the configuration space */
    UINT8 bitMask,            /* Mask which defines field to alter */
    UINT8 data                /* data written to the offset */
    )

DESCRIPTION

This function writes a field into a PCI configuration header without altering any bits not present in the field. It does this by first doing a PCI configuration read (into a temporary location) of the PCI configuration header word which contains the field to be altered. It then alters the bits in the temporary location to match the desired value of the field. It then writes back the temporary location with a configuration write. All configuration accesses are long and the field to alter is specified by the "1" bits in the bitMask parameter.

Do not use this routine to modify any register that contains write 1 to clear type of status bits in the same longword. This specifically applies to the command register. Modify byte operations could potentially be implemented as longword operations with bit shifting and masking. This could have the effect of clearing status bits in registers that aren't being updated. Use pciConfigInLong and pciConfigOutLong, or pciModifyLong, to read and update the entire longword.

RETURNS

OK if operation succeeds, ERROR if operation fails.

SEE ALSO

sysLib


mbx860 : Routines

pciSpecialCycle( )

NAME

pciSpecialCycle( ) - generate a special cycle with a message

SYNOPSIS

STATUS pciSpecialCycle
    (
    int    busNo,             /* bus number */
    UINT32 message            /* data driven onto AD[31:0] */
    )

DESCRIPTION

This routine generates a special cycle with a message.

RETURNS

OK, or ERROR if this library is not initialized

SEE ALSO

sysLib


mbx860 : Routines

pciConfigForeachFunc( )

NAME

pciConfigForeachFunc( ) - check condition on specified bus

SYNOPSIS

STATUS pciConfigForeachFunc
    (
    UINT8            bus,          /* bus to start on */
    BOOL             recurse,      /* if TRUE, do subordinate busses */
    PCI_FOREACH_FUNC funcCheckRtn, /* routine to call for each PCI func */
    void *           pArg          /* argument to funcCheckRtn */
    )

DESCRIPTION

pciConfigForeachFunc( ) discovers the PCI functions present on the bus and calls a specified C-function for each one. If the function returns ERROR, further processing stops.

pciConfigForeachFunc( ) does not affect any HOST<->PCI bridge on the system.

ERRNO

not set

RETURNS

OK normally, or ERROR if funcCheckRtn( ) doesn't return OK.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigReset( )

NAME

pciConfigReset( ) - disable cards for warm boot

SYNOPSIS

STATUS pciConfigReset
    (
    int startType             /* for reboot hook, ignored */
    )

DESCRIPTION

pciConfigReset( ) goes through the list of PCI functions at the top-level bus and disables them, preventing them from writing to memory while the system is trying to reboot.

ERRNO

Not set

RETURNS

OK, always

SEE ALSO

sysLib


mbx860 : Routines

pciDeviceShow( )

NAME

pciDeviceShow( ) - print information about PCI devices

SYNOPSIS

STATUS pciDeviceShow
    (
    int busNo                 /* bus number */
    )

DESCRIPTION

This routine prints information about PCI devices There are two ways to find out an empty device.

-
check Master Abort bit after the access.
-
check whether the read value is 0xffff.
* It uses the second method, since I didn't see the Master Abort bit of the host/PCI bridge changing.

RETURNS

OK, or ERROR if the library is not initialized.

SEE ALSO

sysLib


mbx860 : Routines

pciHeaderShow( )

NAME

pciHeaderShow( ) - print a header of the specified PCI device

SYNOPSIS

STATUS pciHeaderShow
    (
    int busNo,                /* bus number */
    int deviceNo,             /* device number */
    int funcNo                /* function number */
    )

DESCRIPTION

This routine prints a header of the PCI device specified by busNo, deviceNo, and funcNo.

RETURNS

OK, or ERROR if this library is not initialized.

SEE ALSO

sysLib


mbx860 : Routines

pciFindDeviceShow( )

NAME

pciFindDeviceShow( ) - find a device by deviceId, then print an information.

SYNOPSIS

STATUS pciFindDeviceShow
    (
    int vendorId,             /* vendor ID */
    int deviceId,             /* device ID */
    int index                 /* desired instance of device */
    )

DESCRIPTION

This routine finds a device by deviceId, then print an information.

RETURNS

OK, or ERROR if this library is not initialized.

SEE ALSO

sysLib


mbx860 : Routines

pciFindClassShow( )

NAME

pciFindClassShow( ) - find a device by 24-bit class code

SYNOPSIS

STATUS pciFindClassShow
    (
    int classCode,            /* 24-bit class code */
    int index                 /* desired instance of device */
    )

DESCRIPTION

This routine finds a device by its 24-bit PCI class code, then prints its information.

RETURNS

OK, or ERROR if this library is not initialized.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigStatusWordShow( )

NAME

pciConfigStatusWordShow( ) - show the decoded value of the status word

SYNOPSIS

STATUS pciConfigStatusWordShow
    (
    int    bus,               /* bus */
    int    device,            /* device */
    int    function,          /* function */
    void * pArg               /* ignored */
    )

DESCRIPTION

This routine reads the value of the status word for the specified bus,device,function and prints the value in a human-readable format.

RETURNS

OK, always.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigCmdWordShow( )

NAME

pciConfigCmdWordShow( ) - show the decoded value of the command word

SYNOPSIS

STATUS pciConfigCmdWordShow
    (
    int    bus,               /* bus */
    int    device,            /* device */
    int    function,          /* function */
    void * pArg               /* ignored */
    )

DESCRIPTION

This routine reads the value of the command word for the specified bus,device,function and prints the value in a human-readable format.

RETURNS

OK, always.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigFuncShow( )

NAME

pciConfigFuncShow( ) - show configuration details about a function

SYNOPSIS

STATUS pciConfigFuncShow
    (
    int    bus,               /* bus */
    int    device,            /* device */
    int    function,          /* function */
    void * pArg               /* ignored */
    )

DESCRIPTION

This routine reads various information from the specified bus,device,function, and prints the information in a human-readable format.

RETURNS

OK, always.

SEE ALSO

sysLib


mbx860 : Routines

pciConfigTopoShow( )

NAME

pciConfigTopoShow( ) - show PCI topology

SYNOPSIS

void pciConfigTopoShow ()

DESCRIPTION

This routine traverses the PCI bus and prints assorted information about every device found. The information is intended to present the topology of the PCI bus. In includes: (1) the device type, (2) the command and status words, (3) for PCI to PCI bridges the memory and I/O space configuration, and (4) the values of all implemented BARs.

RETURNS

N/A.

SEE ALSO

sysLib


mbx860 : Routines

sysSerialHwInit( )

NAME

sysSerialHwInit( ) - initialize the BSP serial devices to a quiesent state

SYNOPSIS

void sysSerialHwInit (void)

DESCRIPTION

This routine initializes the BSP serial device descriptors and puts the devices in a quiesent state. It is called from sysHwInit( ) with interrupts locked.

Data Parameter Ram layout:

-----------------------------
|                           | DPRAM base (address = 0x2000)
|                           |
|                           |
|---------------------------|
| 8 bytes per descriptor    | Tx Buffer Descriptor (0x2200)
|---------------------------|
|                           |
|---------------------------|
| 16 descriptors @          | Rx Buffer Descriptors (0x2210)
| 8 bytes per descriptor    | 
|                           |
|---------------------------|
|                           | end Rx BDs (0x2290)
|                           |
|                           |
|---------------------------|
| 80 bytes allowed          | Tx Buffer (0x2300)
|---------------------------|
| one receive char/buffer   | Rx Buffer (0x2380)
|---------------------------|
|                           |
|                           |
|                           |
|                           |
|---------------------------|
| 3A hex bytes of parameter | SMC1 Parameter Area (0x3e80)
| info including Rx and Tx  | 
| BD pointers, func codes   |
| etc...                    |
|---------------------------|

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysSerialHwInit2( )

NAME

sysSerialHwInit2( ) - connect BSP serial device interrupts

SYNOPSIS

void sysSerialHwInit2 (void)

DESCRIPTION

This routine connects the BSP serial device interrupts. It is called from sysHwInit2( ). Serial device interrupts could not be connected in sysSerialHwInit( ) because the kernel memory allocator was not initialized at that point, and intConnect( ) calls malloc( ).

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysSerialChanGet( )

NAME

sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel

SYNOPSIS

SIO_CHAN * sysSerialChanGet
    (
    int channel               /* serial channel */
    )

DESCRIPTION

This routine gets the SIO_CHAN device associated with a specified serial channel.

RETURNS

A pointer to the SIO_CHAN structure for the channel, or ERROR if the channel is invalid.

SEE ALSO

sysLib


mbx860 : Routines

sysSerialReset( )

NAME

sysSerialReset( ) - reset the serial device

SYNOPSIS

void sysSerialReset (void)

DESCRIPTION

This function calls sysSerialHwInit( ) to reset the serial device

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

ppc860IntrInit( )

NAME

ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series

SYNOPSIS

STATUS ppc860IntrInit
    (
    VOIDFUNCPTR * cpmIntrVec  /* Intr level of the CPM Intr ctrl */
    )

DESCRIPTION

This routine connects the default demultiplexers, ppc860IntrDeMux( ) and ppc860CpmIntrDeMux, to the external interrupt vector and associates all interrupt sources with the default interrupt handler. This routine is called by sysHwInit( ) in sysLib.c.

NOTE

All interrupt from the SIU and CPM unit are enabled, CICR is setup so that SCC1 has the highest relative interrupt priority, through SCC4 with the lowest.

RETURN

OK or ERROR if the SUI interrupt level to connect the CPM interrupt contoller is wrong.

SEE ALSO

sysLib


mbx860 : Routines

sysClkConnect( )

NAME

sysClkConnect( ) - connect a routine to the system clock interrupt

SYNOPSIS

STATUS sysClkConnect
    (
    FUNCPTR routine,          /* routine to connect */
    int     arg               /* argument for the routine */
    )

DESCRIPTION

This routine specifies the interrupt service routine to be called at each clock interrupt. Normally, it is called from usrRoot( ) in usrConfig.c to connect usrClock( ) to the system clock interrupt.

RETURNS

OK, or ERROR if the routine cannot be connected to the interrupt.

SEE ALSO

sysLib, intConnect( ), usrClock( ), sysClkEnable( )


mbx860 : Routines

sysClkEnable( )

NAME

sysClkEnable( ) - turn on system clock interrupts

SYNOPSIS

void sysClkEnable (void)

DESCRIPTION

This routine enables system clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysClkConnect( ), sysClkDisable( ), sysClkRateSet( )


mbx860 : Routines

sysClkDisable( )

NAME

sysClkDisable( ) - turn off system clock interrupts

SYNOPSIS

void sysClkDisable (void)

DESCRIPTION

This routine disables system clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysClkEnable( )


mbx860 : Routines

sysClkRateGet( )

NAME

sysClkRateGet( ) - get the system clock rate

SYNOPSIS

int sysClkRateGet (void)

DESCRIPTION

This routine returns the system clock rate.

RETURNS

The number of ticks per second of the system clock.

SEE ALSO

sysLib, sysClkEnable( ), sysClkRateSet( )


mbx860 : Routines

sysClkRateSet( )

NAME

sysClkRateSet( ) - set the system clock rate

SYNOPSIS

STATUS sysClkRateSet
    (
    int ticksPerSecond        /* number of clock interrupts per second */
    )

DESCRIPTION

This routine sets the interrupt rate of the system clock. It is called by usrRoot( ) in usrConfig.c.

RETURNS

OK, or ERROR if the tick rate is invalid or the timer cannot be set.

SEE ALSO

sysLib, sysClkEnable( ), sysClkRateGet( )


mbx860 : Routines

sysNvRamGet( )

NAME

sysNvRamGet( ) - get the contents of non-volatile RAM

SYNOPSIS

STATUS sysNvRamGet
    (
    char * string,            /* where to copy non-volatile RAM */
    int    strLen,            /* maximum number of bytes to copy */
    int    offset             /* byte offset into non-volatile RAM */
    )

DESCRIPTION

This routine copies the contents of non-volatile memory into a specified string. The string is terminated with an EOS.

RETURNS

OK, or ERROR if access is outside the non-volatile RAM range.

SEE ALSO

sysLib, sysNvRamSet( )


mbx860 : Routines

sysNvRamSet( )

NAME

sysNvRamSet( ) - write to non-volatile RAM

SYNOPSIS

STATUS sysNvRamSet
    (
    char * string,            /* string to be copied into non-volatile RAM */
    int    strLen,            /* maximum number of bytes to copy */
    int    offset             /* byte offset into non-volatile RAM */
    )

DESCRIPTION

This routine copies a specified string into non-volatile RAM.

RETURNS

OK, or ERROR if access is outside the non-volatile RAM range.

SEE ALSO

sysLib, sysNvRamGet( )


mbx860 : Routines

mbxI2cConfigParamsGet( )

NAME

mbxI2cConfigParamsGet( ) - get the board configuration parameters out of SROM

SYNOPSIS

void mbxI2cConfigParamsGet (void)

DESCRIPTION

This routine will read board specific parameters via the I2C from the SROM and the DIMM. The results will be store in temprory variables in DPRAM, and then copied into global variables in sysHwInit.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

mbxI2cMemcConfig( )

NAME

mbxI2cMemcConfig( ) - configure the MEMC registers

SYNOPSIS

void mbxI2cMemcConfig (void)

DESCRIPTION

This routine will perform the final adjustments to the Memory Controller Bank/Option registers.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

qspanHostInit( )

NAME

qspanHostInit( ) - initialize the QSpan PCIBus bridge controller

SYNOPSIS

void qspanHostInit
    (
    UINT32 qspanAdr           /* base address of the QSpan device regs. */
    )

DESCRIPTION

This function's purpose is to initialize the QSpan device. This device spans the QBus to PCIBus.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

qspanRegMap( )

NAME

qspanRegMap( ) - map QSPAN registers

SYNOPSIS

STATUS qspanRegMap
    (
    UINT32 qspanAdr,          /* base address of the QSpan device regs. */
    UINT32 pciSpace,
    UINT32 baseAdr
    )

DESCRIPTION

This function will map a 4KB block in either PCI memory of I/O space to allow access to the QSPAN register set.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

qspanSlaveImageSet( )

NAME

qspanSlaveImageSet( ) - setup a PCI slave image

SYNOPSIS

void qspanSlaveImageSet
    (
    UINT32 qspanAdr,          /* base address of the QSpan device regs. */
    UINT32 image,             /* slave image number 0 or 1 */
    UINT32 cntrlRegValue,     /* value to be stored in the slave image */
                              /* control register */ 
    UINT32 adrRegValue        /* value to be stored in the slave image */
                              /* address translation register */ 
    )

DESCRIPTION

This function will program one of the QSPAN PCI slave images (CPU to PCI mapping).

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

qspanTargetImageSet( )

NAME

qspanTargetImageSet( ) - setup a PCI target image

SYNOPSIS

void qspanTargetImageSet
    (
    UINT32 qspanAdr,          /* base address of the QSpan device regs. */
    UINT32 image,             /* target image number 0 or 1 */
    UINT32 pciBaseAdr,        /* base address of the target image */
    UINT32 translateAdr,      /* base address for translation of target adr */
    UINT32 cntrlRegValue      /* value to be stored in the target image */
                              /* control register */ 
    )

DESCRIPTION

This function will program the selected QSPAN PCI target image (mapping the address space from the point of view of the PCI bus). It is used mostly for mapping access from PCI memory space to the local DRAM.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

qspanHostEnable( )

NAME

qspanHostEnable( ) - enable the bridge

SYNOPSIS

void qspanHostEnable
    (
    UINT32 qspanAdr           /* base address of the QSpan device regs. */
    )

DESCRIPTION

This function enables I/O-space, memory-space, and bus mastering on the host.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

qspanHostReset( )

NAME

qspanHostReset( ) - reset the QSpan PCIBus bridge controller

SYNOPSIS

void qspanHostReset
    (
    UINT32 qspanAdr           /* base address of the QSpan device regs. */
    )

DESCRIPTION

This function's purpose is to reset the QSpan device.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysIbcPciExtInit( )

NAME

sysIbcPciExtInit( ) - initialize the extended portion of the IBC PCI header

SYNOPSIS

STATUS sysIbcPciExtInit
    (
    int pciBusNo,             /* PCI bus number */
    int pciDevNo,             /* PCI device number */
    int pciFuncNo             /* PCI function number */
    )

DESCRIPTION

This routine initializes the extended portion of the ISA Bridge Controller (IBC) PCI header.

RETURNS

OK or ERROR.

SEE ALSO

sysLib,


mbx860 : Routines

sysIbcInit( )

NAME

sysIbcInit( ) - Initialize the IBC

SYNOPSIS

STATUS sysIbcInit (void)

DESCRIPTION

This routine initializes the non-PCI Header configuration registers of the IBC within the W83C553 PIB.

RETURNS

OK always

SEE ALSO

sysLib


mbx860 : Routines

sysIbcIntConnect( )

NAME

sysIbcIntConnect( ) - connect an interrupt handler to the system vector table

SYNOPSIS

STATUS sysIbcIntConnect
    (
    VOIDFUNCPTR * vector,     /* interrupt vector to attach */
    VOIDFUNCPTR   routine,    /* routine to be called */
    int           parameter   /* parameter to be passed to routine */
    )

DESCRIPTION

This function connects an interrupt handler to the system vector table.

RETURNS

OK or ERROR.

SEE ALSO

sysLib


mbx860 : Routines

sysIbcIntEnable( )

NAME

sysIbcIntEnable( ) - enable a IBC interrupt level

SYNOPSIS

void sysIbcIntEnable
    (
    int intNum                /* interrupt level to enable */
    )

DESCRIPTION

This routine enables a specified IBC interrupt level.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysIbcIntDisable( )

NAME

sysIbcIntDisable( ) - disable a IBC interrupt level

SYNOPSIS

void sysIbcIntDisable
    (
    int intNum                /* interrupt level to disable */
    )

DESCRIPTION

This routine disables a specified IBC interrupt level.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysIbcIntHandler( )

NAME

sysIbcIntHandler( ) - handler of the sl82565 IBC interrupt.

SYNOPSIS

void sysIbcIntHandler (void)

DESCRIPTION

This routine handles interrupts originating from the W83C553 PIB ISA Bus Controller (IBC). This device implements the functional equivalent of two cascaded 8259 PICs.

This routine is entered with CPU external interrupts disabled.

Because the ISA bus is only accessible via the PCI bus, this driver first initiates a PCI interrupt acknowledge cycle to read the interrupt number (vector) coming from the IBC.

It then saves the current ISA interrupt mask values and sets the new mask values to mask all further ISA interrupts of equal or lesser level. It then re-enables MPIC interrupts and re-enables CPU external interrupts.

This routine then processes the interrupt by calling all interrupt service routines chained to the vector.

Finally, this routine disables CPU external interrupts and restores the ISA interrupt mask values before returning.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

smcC67Init( )

NAME

smcC67Init( ) - initialize the Super I/O chip

SYNOPSIS

void smcC67Init (void)

DESCRIPTION

This function performs the necessary initialization of the devices on the SMC fdc37c67 Super I/O chip.

Upon completion, UIO resource registers are mapped as follows:

      Resource        Enabled         Address
      FDC             Yes             PRI     3F0-3F7
      IDE             Yes             PRI     1F0-1F7 3F6, 3F7
      UART1           Yes             COM1    3F8-3FF
      UART2           Yes             COM2    2F8-2FF
      Parallel PORT   Yes             LPT1    3BC-3BE
      RTC             Yes                     070, 071
      KBC             Yes                     060, 064
      GPIO            Yes                     0EA, 0EB

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

i2cMcp( )

NAME

i2cMcp( ) - download RISC microcode patch

SYNOPSIS

void i2cMcp ()

DESCRIPTION

This function's purpose is to install the RISC microcode patch.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysModel( )

NAME

sysModel( ) - return the model name of the CPU board

SYNOPSIS

char * sysModel (void)

DESCRIPTION

This routine returns the model name of the CPU board.

RETURNS

A pointer to the string.

SEE ALSO

sysLib


mbx860 : Routines

sysBspRev( )

NAME

sysBspRev( ) - return the bsp version with the revision eg 1.0/x

SYNOPSIS

char * sysBspRev (void)

DESCRIPTION

This function returns a pointer to a bsp version with the revision. for eg. 1.0/x. BSP_REV defined in config.h is concatanated to BSP_VERSION and returned.

RETURNS

A pointer to the BSP version/revision string.

SEE ALSO

sysLib


mbx860 : Routines

sysClkRateAdjust( )

NAME

sysClkRateAdjust( ) - Adjust the clock frequency

SYNOPSIS

void sysClkRateAdjust
    (
    int * sysDecClkFreq
    )

DESCRIPTION

This function recalculates the decrementer clock frequency value based on the actual system clock speed.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysHwInit( )

NAME

sysHwInit( ) - initialize the system hardware

SYNOPSIS

void sysHwInit (void)

DESCRIPTION

This routine initializes various feature of the MPC860ADS boards. It sets up the control registers, initializes various devices if they are present.

NOTE

This routine should not be called directly by the user.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysPciCfgRead( )

NAME

sysPciCfgRead( ) - read longword from PCI configuration space

SYNOPSIS

STATUS sysPciCfgRead
    (
    int    busNo,
    int    deviceNo,
    int    funcNo,
    int    offset,
    int    size,              /* 1, 2, or 4 */
    void * pResult
    )

DESCRIPTION

This does a QSPAN style PCI read. This function is passed as a pointer during initialization of PCI mechanism 0 in pciConfigLibInit. This function has the machine check handler support included in.

RETURNS

OK always.

SEE ALSO

sysLib


mbx860 : Routines

sysPciCfgWrite( )

NAME

sysPciCfgWrite( ) - write longword to PCI configuration space

SYNOPSIS

STATUS sysPciCfgWrite
    (
    int    busNo,
    int    deviceNo,
    int    funcNo,
    int    offset,
    int    size,
    UINT32 data
    )

DESCRIPTION

This does a QSPAN style PCI write. This function is passed as a pointer during initialization of PCI mechanism 0 in pciConfigLibInit. This function has the machine check handler support included in.

RETURNS

OK always

SEE ALSO

sysLib


mbx860 : Routines

sysPhysMemTop( )

NAME

sysPhysMemTop( ) - get the address of the top of physical memory

SYNOPSIS

char * sysPhysMemTop (void)

DESCRIPTION

This routine returns the address of the first missing byte of memory, which indicates the top of memory.

RETURNS

The address of the top of physical memory.

SEE ALSO

sysLib, sysMemTop( )


mbx860 : Routines

sysMemTop( )

NAME

sysMemTop( ) - get the address of the top of VxWorks memory

SYNOPSIS

char * sysMemTop (void)

DESCRIPTION

This routine returns a pointer to the first byte of memory not controlled or used by VxWorks.

The user can reserve memory space by defining the macro USER_RESERVED_MEM in config.h. This routine returns the address of the reserved memory area. The value of USER_RESERVED_MEM is in bytes.

RETURNS

The address of the top of VxWorks memory.

SEE ALSO

sysLib


mbx860 : Routines

sysToMonitor( )

NAME

sysToMonitor( ) - transfer control to the ROM monitor

SYNOPSIS

STATUS sysToMonitor
    (
    int startType             /* parameter passed to ROM to tell it how */
                              /* to boot */ 
    )

DESCRIPTION

This routine transfers control to the ROM monitor. Normally, it is called only by reboot( )--which services ^X--and bus errors at interrupt level. However, in some circumstances, the user may wish to introduce a startType to enable special boot ROM facilities.

RETURNS

Does not return.

SEE ALSO

sysLib


mbx860 : Routines

sysProcNumGet( )

NAME

sysProcNumGet( ) - get the processor number

SYNOPSIS

int sysProcNumGet (void)

DESCRIPTION

This routine returns the processor number for the CPU board, which is set with sysProcNumSet( ).

RETURNS

The processor number for the CPU board.

SEE ALSO

sysLib, sysProcNumSet( )


mbx860 : Routines

sysProcNumSet( )

NAME

sysProcNumSet( ) - set the processor number

SYNOPSIS

void sysProcNumSet
    (
    int procNum               /* processor number */
    )

DESCRIPTION

This routine sets the processor number for the CPU board. Processor numbers should be unique on a single backplane.

Not applicable for the busless 860Ads.

RETURNS

N/A

SEE ALSO

sysLib, sysProcNumGet( )


mbx860 : Routines

sysLocalToBusAdrs( )

NAME

sysLocalToBusAdrs( ) - convert a local address to a bus address

SYNOPSIS

STATUS sysLocalToBusAdrs
    (
    int      adrsSpace,       /* bus address space where busAdrs resides */
    char *   localAdrs,       /* local address to convert */
    char * * pBusAdrs         /* where to return bus address */
    )

DESCRIPTION

This routine gets the VMEbus address that accesses a specified local memory address.

Not applicable for the 860Ads

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysBusToLocalAdrs( )


mbx860 : Routines

sysBusToLocalAdrs( )

NAME

sysBusToLocalAdrs( ) - convert a bus address to a local address

SYNOPSIS

STATUS sysBusToLocalAdrs
    (
    int      adrsSpace,       /* bus address space where busAdrs resides */
    char *   busAdrs,         /* bus address to convert */
    char * * pLocalAdrs       /* where to return local address */
    )

DESCRIPTION

This routine gets the local address that accesses a specified VMEbus physical memory address.

Not applicable for the 860Ads

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysLocalToBusAdrs( )


mbx860 : Routines

sysBusTas( )

NAME

sysBusTas( ) - test and set a location across the bus

SYNOPSIS

BOOL sysBusTas
    (
    char * adrs               /* address to be tested-and-set */
    )

DESCRIPTION

This routine does an atomic test-and-set operation across the backplane.

Not applicable for the 860Ads.

RETURNS

FALSE, always.

SEE ALSO

sysLib, vxTas( )


mbx860 : Routines

sysBusClearTas( )

NAME

sysBusClearTas( ) - test and clear

SYNOPSIS

void sysBusClearTas
    (
    volatile char * address   /* address to be tested-and-cleared */
    )

DESCRIPTION

This routine is a null function.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetDisable( )

NAME

sysCpmEnetDisable( ) - disable the Ethernet controller

SYNOPSIS

void sysCpmEnetDisable
    (
    int unit                  /* not used */
    )

DESCRIPTION

This routine is expected to perform any target specific functions required to disable the Ethernet controller. This usually involves disabling the Transmit Enable (TENA) signal.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetIntDisable( )

NAME

sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt

SYNOPSIS

void sysCpmEnetIntDisable
    (
    int unit                  /* not used */
    )

DESCRIPTION

This routine disable the interrupt for the Ethernet interface specified by unit.

RETURNS

N/A.

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetEnable( )

NAME

sysCpmEnetEnable( ) - enable the Ethernet controller

SYNOPSIS

STATUS sysCpmEnetEnable
    (
    int unit                  /* not used */
    )

DESCRIPTION

This routine is expected to perform any target specific functions required to enable the Ethernet controller. These functions typically include enabling the Transmit Enable signal (TENA) and connecting the transmit and receive clocks to the SCC.

RETURNS

OK, or ERROR if the Ethernet controller cannot be enabled.

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetAddrGet( )

NAME

sysCpmEnetAddrGet( ) - get the hardware Ethernet address

SYNOPSIS

STATUS sysCpmEnetAddrGet
    (
    int     unit,             /* not used */
    UINT8 * addr
    )

DESCRIPTION

This routine provides the six byte Ethernet hardware address that will be used by each individual Ethernet device unit. This routine must copy the six byte address to the space provided by addr.

RETURNS

OK, or ERROR if the Ethernet address cannot be returned.

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetCommand( )

NAME

sysCpmEnetCommand( ) - issue a command to the Ethernet interface controller

SYNOPSIS

STATUS sysCpmEnetCommand
    (
    int    unit,
    UINT16 command
    )

DESCRIPTION

RETURNS

OK, or ERROR if the Ethernet controller could not be restarted.

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetIntEnable( )

NAME

sysCpmEnetIntEnable( ) - enable the Ethernet interface interrupt

SYNOPSIS

void sysCpmEnetIntEnable
    (
    int unit
    )

DESCRIPTION

This routine enable the interrupt for the Ethernet interface specified by unit.

RETURNS

N/A.

SEE ALSO

sysLib


mbx860 : Routines

sysCpmEnetIntClear( )

NAME

sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt

SYNOPSIS

void sysCpmEnetIntClear
    (
    int unit
    )

DESCRIPTION

This routine clears the interrupt for the Ethernet interface specified by unit.

RETURNS

N/A.

SEE ALSO

sysLib


mbx860 : Routines

sysPciTrap( )

NAME

sysPciTrap( ) - trap handler for PCI exception

SYNOPSIS

void sysPciTrap
    (
    ESFPPC * pEsf             /* pointer to exception stack frame */
    )

DESCRIPTION

This routine is called from the excConnectCode stub if the PCI configuration access generates an exception. By default, sysIn... returns the value read. This code changes the PC to sysPciErr which sets the return value to -1.
 NOTE:  The QSpan PCI Bridge causes machine check exceptions to
 occur when a non-present device address is put into the
 configuration register.  This is why the sysPciTrap routine
 is essential.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysMsDelay( )

NAME

sysMsDelay( ) - delay for the specified amount of time (MS)

SYNOPSIS

void sysMsDelay
    (
    UINT delay                /* length of time in MS to delay */
    )

DESCRIPTION

This routine will delay for the specified amount of time by counting decrementer ticks.

This routine is not dependent on a particular rollover value for the decrementer, it should work no matter what the rollover value is.

A small amount of count may be lost at the rollover point resulting in the sysMsDelay( ) causing a slightly longer delay than requested.

This routine will produce incorrect results if the delay time requested requires a count larger than 0xffffffff to hold the decrementer elapsed tick count. For an MBX860 40MHz board that amounts to about 1716 seconds (thus not considered too severe a restriction).

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysIntEnablePIC( )

NAME

sysIntEnablePIC( ) - enable an ISA/PCI interrupt

SYNOPSIS

STATUS sysIntEnablePIC
    (
    int intNum
    )

DESCRIPTION

This function call is used by certain vxWorks device drivers. It calls the system routine intConnect.

RETURNS

OK or ERROR

SEE ALSO

sysLib


mbx860 : Routines

sysDelay( )

NAME

sysDelay( ) - delay for approx. 1ms

SYNOPSIS

void sysDelay (void)

DESCRIPTION

This implements an unsupported system call to support drivers ported from Intel platforms.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysAtaInit( )

NAME

sysAtaInit( ) - initialize the EIDE/ATA interface

SYNOPSIS

void sysAtaInit
    (
    int pciBusNo,             /* PCI bus number */
    int pciDevNo,             /* PCI device number */
    int pciFuncNo             /* PCI function number */
    )

DESCRIPTION

Perform the necessary initialization required before starting up the ATA/EIDE driver.

SEE ALSO

sysLib


mbx860 : Routines

sysInByteString( )

NAME

sysInByteString( ) - reads a string of bytes from an io address.

SYNOPSIS

void sysInByteString
    (
    ULONG   ioAddr,           /* I/O address */
    UCHAR * bufPtr,           /* pointer to data buffer */
    int     nBytes            /* number of bytes to read */
    )

DESCRIPTION

This function reads a byte string from a specified io address.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysOutByteString( )

NAME

sysOutByteString( ) - writes a string of bytes to an io address.

SYNOPSIS

void sysOutByteString
    (
    ULONG   ioAddr,           /* I/O address */
    UCHAR * bufPtr,           /* pointer to data buffer */
    int     nBytes            /* number of bytes to write */
    )

DESCRIPTION

This function writes a byte string to a specified io address.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysInWordString( )

NAME

sysInWordString( ) - reads a string of words from an io address.

SYNOPSIS

void sysInWordString
    (
    ULONG    ioAddr,          /* I/O address */
    UINT16 * bufPtr,          /* pointer to data buffer */
    int      nWords           /* number of 2 byte words to read */
    )

DESCRIPTION

This function reads a word string from a specified io address.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysInWordStringRev( )

NAME

sysInWordStringRev( ) - byte reversed word read.

SYNOPSIS

void sysInWordStringRev
    (
    ULONG    ioAddr,          /* I/O address */
    UINT16 * bufPtr,          /* pointer to data buffer */
    int      nWords           /* number of 2 byte words to read */
    )

DESCRIPTION

This function reads a byte reversed word string from a specified io address.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysOutWordString( )

NAME

sysOutWordString( ) - writes a string of words to an io address.

SYNOPSIS

void sysOutWordString
    (
    ULONG    ioAddr,          /* I/O address */
    UINT16 * bufPtr,          /* pointer to data buffer */
    int      nWords           /* number of 2 byte words to write */
    )

DESCRIPTION

This function writes a word string from a specified io address.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysInLongString( )

NAME

sysInLongString( ) - reads a string of longwords from an io address.

SYNOPSIS

void sysInLongString
    (
    ULONG   ioAddr,           /* I/O address */
    ULONG * bufPtr,           /* pointer to data buffer */
    int     nLongs            /* number of 4 byte words to read */
    )

DESCRIPTION

This function reads a longword string from a specified io address.

RETURNS

N/A

SEE ALSO

sysLib


mbx860 : Routines

sysOutLongString( )

NAME

sysOutLongString( ) - writes a string of longwords to an io address.

SYNOPSIS

void sysOutLongString
    (
    ULONG   ioAddr,           /* I/O address */
    ULONG * bufPtr,           /* pointer to data buffer */
    int     nLongs            /* number of 4 byte words to write */
    )

DESCRIPTION

This function writes a longword string from a specified io address.

RETURNS

N/A

SEE ALSO

sysLib