VxWorks BSP Reference : wrMdpPro8xx

sysLib [wrMdpPro8xx]

NAME

sysLib [wrMdpPro8xx] - system-dependent library

ROUTINES

sysLocalToBusAdrs( ) - convert a local address to a bus address
sysBusToLocalAdrs( ) - convert a bus address to a local address
sysBusIntAck( ) - acknowledge a bus interrupt
sysBusIntGen( ) - generate a bus interrupt
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
sysMailboxEnable( ) - enable the mailbox interrupt
sysBusTas( ) - test and set a location across the bus
sysSerialHwInit2( ) - connect BSP serial device interrupts
sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel
sysSerialReset( ) - reset the serail device
ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
eepromNvRamSetup( ) - setup non-volatile ram system
eepromReadByte( ) - read one byte of Non-Volatile Ram
eepromWriteByte( ) - write one byte to Non-Volatile Ram
eepromUnlock( ) - Unlock the eeprom via the software protection mechanism
eepromLock( ) - Lock the eeprom via the software protection mechanism
eepromDelay( ) - eeprom delay routine
sysLedBarOn( ) - turn all the LED's on.
sysLedBarAllOn( ) - turn selected LED on.
sysLedBarOff( ) - turn selected LED off.
sysLedBarAllOff( ) - turn off all LED's.
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
sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt
sysAuxClkDisable( ) - turn off auxiliary clock interrupts
sysAuxClkEnable( ) - turn on auxiliary clock interrupts
sysAuxClkRateGet( ) - get the auxiliary clock rate
sysAuxClkRateSet( ) - set the auxiliary clock rate
sysTimestampConnect( ) - connect a user routine to the timestamp timer interrupt
sysTimestampEnable( ) - initialize and enable the timestamp timer
sysTimestampDisable( ) - turn off auxiliary clock interrupts
sysTimestampPeriod( ) - get the period of a timestamp timer
sysTimestampFreq( ) - get a timestamp timer clock frequency
sysTimestamp( ) - get a timestamp timer tick count
sysTimestampLock( ) - lock interrupts and get the timestamp timer tick count
sysCheckIfVware( ) - check if we were lunched by vWARE
sysMotCpmEndLoad( ) - load an istance of the motCpmEnd driver
sysCpmEnetDisable( ) - disable the Ethernet controller
sysCpmEnetEnable( ) - enable the Ethernet controller
sysCpmEnetAddrGet( ) - get the hardware Ethernet address
sysCpmEnetCommand( ) - issue a command code to the ethernet controller.
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt
sysNetHwInit( ) - initialize the network interface
sysNetHwInit2( ) - initialize additional features of the network interface
sysEnetAddrGet( ) - gets the 6 byte ethernet address
sysEnetAddrSet( ) - sets the 6 byte ethernet address
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the BSP version and revision number
sysHwInit( ) - initialize the system hardware
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
sysHwInit2( ) - initialize additional system hardware
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
sysCpuNum( ) - determines CPU Number: 860,823, etc.
sysCpuType( ) - determines the 8xx CPU type
sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu frequency
sysCpuSpeed( ) - determines operating frequence via PLPRCR Register
sysCpuSpeedAdjust( ) - change CPU Speed via PLPRCR
sysCpmReset( ) - issues a CPM reset command
sysMsDelay( ) - delay for the specified amount of time (MS)
sysDelay( ) - delay for approx. 1ms
sysIntEnablePIC( ) - enable an ISA/PCI interrupt
sysIntDisablePIC( ) - disable an ISA/PCI interrupt

DESCRIPTION

Depending on the value of CPU passed to the system by the compiler command line, the CPU_FAMILY is defined. This must be the first header file included by vxWorks.h.


wrMdpPro8xx : Routines

sysLocalToBusAdrs( )

NAME

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

SYNOPSIS

STATUS sysLocalToBusAdrs
    (
    int    adrsSpace,         /* bus address space in which busAdrs */
                              /* resides, use address modifier codes defined */
                              /* in vme.h, such as VME_AM_STD_SUP_DATA */ 
    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.

NOTE

This routine has no effect, since there is no VMEbus.

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysBusToLocalAdrs( )


wrMdpPro8xx : Routines

sysBusToLocalAdrs( )

NAME

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

SYNOPSIS

STATUS sysBusToLocalAdrs
    (
    int    adrsSpace,         /* bus address space in which busAdrs */
                              /* resides, use address modifier codes defined */
                              /* in vme.h, such as VME_AM_STD_SUP_DATA */ 
    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 address.

NOTE

This routine has no effect, since there is no VMEbus.

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysLocalToBusAdrs( )


wrMdpPro8xx : Routines

sysBusIntAck( )

NAME

sysBusIntAck( ) - acknowledge a bus interrupt

SYNOPSIS

int sysBusIntAck
    (
    int intLevel              /* interrupt level to acknowledge */
    )

DESCRIPTION

This routine acknowledges a specified VMEbus interrupt level.

NOTE

This routine has no effect, since there is no VMEbus.

RETURNS

NULL.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysBusIntGen( )

NAME

sysBusIntGen( ) - generate a bus interrupt

SYNOPSIS

STATUS sysBusIntGen
    (
    int level,                /* bus interrupt level to generate */
    int vector                /* interrupt vector to return (0-255) */
    )

DESCRIPTION

This routine generates a VMEbus interrupt for a specified level with a specified vector.

NOTE

This routine has no effect, since there is no VMEbus.

RETURNS

ERROR, always.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysMailboxConnect( )

NAME

sysMailboxConnect( ) - connect a routine to the mailbox interrupt

SYNOPSIS

STATUS sysMailboxConnect
    (
    FUNCPTR routine,          /* routine called at each mailbox interrupt */
    int     arg               /* argument with which to call routine */
    )

DESCRIPTION

This routine specifies the interrupt service routine to be called at each mailbox interrupt.

NOTE

This routine has no effect, since the hardware does not support mailbox interrupts.

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysMailboxEnable( )


wrMdpPro8xx : Routines

sysMailboxEnable( )

NAME

sysMailboxEnable( ) - enable the mailbox interrupt

SYNOPSIS

STATUS sysMailboxEnable
    (
    INT8 * mailboxAdrs        /* mailbox address */
    )

DESCRIPTION

This routine enables the mailbox interrupt.

NOTE

This routine has no effect, since the hardware does not support mailbox interrupts.

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysMailboxConnect( )


wrMdpPro8xx : Routines

sysBusTas( )

NAME

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

SYNOPSIS

BOOL sysBusTas
    (
    INT8 * addr               /* address to be tested and set */
    )

DESCRIPTION

This routine performs a test-and-set (TAS) instruction across the backplane.

NOTE

This routine is equivalent to vxTas( ), since there is no VMEbus.

RETURNS

TRUE if the value had not been set but is now, or FALSE if the value was set already.

SEE ALSO

sysLib, vxTas( )


wrMdpPro8xx : 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, sysHwInit2( )


wrMdpPro8xx : 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


wrMdpPro8xx : Routines

sysSerialReset( )

NAME

sysSerialReset( ) - reset the serail device

SYNOPSIS

void sysSerialReset (void)

DESCRIPTION

This function calls sysSerialHwInit( ) to reset the serail device

RETURNS

N/A

SEE ALSO

sysLib


wrMdpPro8xx : 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


wrMdpPro8xx : 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( )


wrMdpPro8xx : 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( )


wrMdpPro8xx : Routines

eepromNvRamSetup( )

NAME

eepromNvRamSetup( ) - setup non-volatile ram system

SYNOPSIS

void eepromNvRamSetup (void)

DESCRIPTION

This routine setup the Non-Volatile RAM.

RETURNS

N/A

SEE ALSO

sysLib, eepromReadByte( ), eepromWriteByte( ), eepromUnlock( ), eepromLock( )


wrMdpPro8xx : Routines

eepromReadByte( )

NAME

eepromReadByte( ) - read one byte of Non-Volatile Ram

SYNOPSIS

UINT8 eepromReadByte
    (
    int offset
    )

DESCRIPTION

This routine read one byte of Non-Volatile RAM.

RETURNS

One byte of data.

SEE ALSO

sysLib, eepromNvRamSetup( ), eepromWriteByte( ), eepromUnlock( ), eepromLock( )


wrMdpPro8xx : Routines

eepromWriteByte( )

NAME

eepromWriteByte( ) - write one byte to Non-Volatile Ram

SYNOPSIS

STATUS eepromWriteByte
    (
    int   offset,
    UINT8 data
    )

DESCRIPTION

This routine write one byte of data to nonvolatile ram.

RETURNS

OK or ERROR if cannot write nvram

SEE ALSO

sysLib, eepromNvRamSetup( ), eepromReadByte( ), eepromUnlock( ), eepromLock( )


wrMdpPro8xx : Routines

eepromUnlock( )

NAME

eepromUnlock( ) - Unlock the eeprom via the software protection mechanism

SYNOPSIS

void eepromUnlock (void)

DESCRIPTION

This routine unlock the eeprom via the software protection mechanism.

RETURNS

N/A

SEE ALSO

sysLib, eepromNvRamSetup( ), eepromReadByte( ), eepromWriteByte( ), eepromLock( )


wrMdpPro8xx : Routines

eepromLock( )

NAME

eepromLock( ) - Lock the eeprom via the software protection mechanism

SYNOPSIS

void eepromLock (void)

DESCRIPTION

This routine lock the eeprom via the software protection mechanism.

RETURNS

N/A

SEE ALSO

sysLib, eepromNvRamSetup( ), eepromReadByte( ), eepromWriteByte( ), eepromUnlock( )


wrMdpPro8xx : Routines

eepromDelay( )

NAME

eepromDelay( ) - eeprom delay routine

SYNOPSIS

void eepromDelay
    (
    ULONG delay
    )

DESCRIPTION

This routine is the eeprom delay routine.

RETURNS

N/A

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysLedBarOn( )

NAME

sysLedBarOn( ) - turn all the LED's on.

SYNOPSIS

void sysLedBarOn
    (
    UCHAR value,
    UCHAR action
    )

DESCRIPTION

This routine set the selected LED to on.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedBarAllOn( ), sysLedBarOff( ), sysLedBarAllOff( ).


wrMdpPro8xx : Routines

sysLedBarAllOn( )

NAME

sysLedBarAllOn( ) - turn selected LED on.

SYNOPSIS

void sysLedBarAllOn (void)

DESCRIPTION

This routine set all the LED's on.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedBarOn( ), sysLedBarOff( ), sysLedBarAllOff( ).


wrMdpPro8xx : Routines

sysLedBarOff( )

NAME

sysLedBarOff( ) - turn selected LED off.

SYNOPSIS

void sysLedBarOff
    (
    UCHAR value,
    UCHAR action
    )

DESCRIPTION

This routine set the selected LED to off.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedBarOn( ), sysLedBarAllOn( ), sysLedBarAllOff( ), sysLedBarTest( ).


wrMdpPro8xx : Routines

sysLedBarAllOff( )

NAME

sysLedBarAllOff( ) - turn off all LED's.

SYNOPSIS

void sysLedBarAllOff (void)

DESCRIPTION

This routine set all LED's to off.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedBarOn( ), sysLedBarAllOn( ), sysLedBarOff( ).


wrMdpPro8xx : 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( )


wrMdpPro8xx : 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( )


wrMdpPro8xx : 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( )


wrMdpPro8xx : 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( )


wrMdpPro8xx : 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( )


wrMdpPro8xx : Routines

sysAuxClkConnect( )

NAME

sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt

SYNOPSIS

STATUS sysAuxClkConnect
    (
    FUNCPTR routine,          /* routine called at each aux. clock interrupt */
    int     arg               /* argument to auxiliary clock interrupt */
                              /* routine */ 
    )

DESCRIPTION

This routine specifies the interrupt service routine to be called at each auxiliary clock interrupt. It does not enable auxiliary clock interrupts.

RETURNS

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

SEE ALSO

sysLib, intConnect( ), sysAuxClkEnable( )


wrMdpPro8xx : Routines

sysAuxClkDisable( )

NAME

sysAuxClkDisable( ) - turn off auxiliary clock interrupts

SYNOPSIS

void sysAuxClkDisable (void)

DESCRIPTION

This routine disables auxiliary clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysAuxClkEnable( )


wrMdpPro8xx : Routines

sysAuxClkEnable( )

NAME

sysAuxClkEnable( ) - turn on auxiliary clock interrupts

SYNOPSIS

void sysAuxClkEnable (void)

DESCRIPTION

This routine enables auxiliary clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysAuxClkConnect( ), sysAuxClkDisable( ), sysAuxClkRateSet( )


wrMdpPro8xx : Routines

sysAuxClkRateGet( )

NAME

sysAuxClkRateGet( ) - get the auxiliary clock rate

SYNOPSIS

int sysAuxClkRateGet (void)

DESCRIPTION

This routine returns the interrupt rate of the auxiliary clock.

RETURNS

The number of ticks per second of the auxiliary clock.

SEE ALSO

sysLib, sysAuxClkEnable( ), sysAuxClkRateSet( )


wrMdpPro8xx : Routines

sysAuxClkRateSet( )

NAME

sysAuxClkRateSet( ) - set the auxiliary clock rate

SYNOPSIS

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

DESCRIPTION

This routine sets the interrupt rate of the auxiliary clock. It does not enable auxiliary clock interrupts.

RETURNS

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

SEE ALSO

sysLib, sysAuxClkEnable( ), sysAuxClkRateGet( )


wrMdpPro8xx : Routines

sysTimestampConnect( )

NAME

sysTimestampConnect( ) - connect a user routine to the timestamp timer interrupt

SYNOPSIS

STATUS sysTimestampConnect
    (
    FUNCPTR routine,          /* routine called at each timestamp timer */
                              /* interrupt */ 
    int     arg               /* argument with which to call routine */
    )

DESCRIPTION

This routine specifies the user interrupt routine to be called at each timestamp timer interrupt. It does not enable the timestamp timer itself.

RETURNS

OK, or ERROR if sysTimestampInt( ) interrupt handler is not used.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysTimestampEnable( )

NAME

sysTimestampEnable( ) - initialize and enable the timestamp timer

SYNOPSIS

STATUS sysTimestampEnable (void)

DESCRIPTION

This routine connects interrupts, and enables the timer device

RETURNS

TRUE always

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysTimestampDisable( )

NAME

sysTimestampDisable( ) - turn off auxiliary clock interrupts

SYNOPSIS

STATUS sysTimestampDisable (void)

DESCRIPTION

This routine disables auxiliary clock interrupts.

RETURNS

OK, always

SEE ALSO

sysLib, sysTimestampEnable( )


wrMdpPro8xx : Routines

sysTimestampPeriod( )

NAME

sysTimestampPeriod( ) - get the period of a timestamp timer

SYNOPSIS

UINT32 sysTimestampPeriod (void)

DESCRIPTION

This routine gets the period of the timestamp timer, in ticks. The period, or terminal count, is the number of ticks to which the timestamp timer counts before rolling over and restarting the counting process.

RETURNS

The period of the timestamp timer in counter ticks.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysTimestampFreq( )

NAME

sysTimestampFreq( ) - get a timestamp timer clock frequency

SYNOPSIS

UINT32 sysTimestampFreq (void)

DESCRIPTION

This routine gets the frequency of the timer clock, in ticks per second. The rate of the timestamp timer is set explicitly by the hardware and typically cannot be altered.

NOTE

Because the PowerPC decrementer clock serves as the timestamp timer, the decrementer clock frequency is also the timestamp timer frequency.

RETURNS

The timestamp timer clock frequency, in ticks per second.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysTimestamp( )

NAME

sysTimestamp( ) - get a timestamp timer tick count

SYNOPSIS

UINT32 sysTimestamp (void)

DESCRIPTION

This routine returns the current value of the timestamp timer tick counter. The tick count can be converted to seconds by dividing it by the return of sysTimestampFreq( ).

This routine should be called with interrupts locked. If interrupts are not locked, sysTimestampLock( ) should be used instead.

RETURNS

The current timestamp timer tick count.

SEE ALSO

sysLib, sysTimestampFreq( ), sysTimestampLock( )


wrMdpPro8xx : Routines

sysTimestampLock( )

NAME

sysTimestampLock( ) - lock interrupts and get the timestamp timer tick count

SYNOPSIS

UINT32 sysTimestampLock (void)

DESCRIPTION

This routine locks interrupts when the tick counter must be stopped in order to read it or when two independent counters must be read. It then returns the current value of the timestamp timer tick counter.

The tick count can be converted to seconds by dividing it by the return of sysTimestampFreq( ).

If interrupts are already locked, sysTimestamp( ) should be used instead.

RETURNS

The current timestamp timer tick count.

SEE ALSO

sysLib, sysTimestampFreq( ), sysTimestamp( )


wrMdpPro8xx : Routines

sysCheckIfVware( )

NAME

sysCheckIfVware( ) - check if we were lunched by vWARE

SYNOPSIS

BOOL sysCheckIfVware (void)

DESCRIPTION

This routine check if we were lunched by vWARE

RETURNS

TRUE if yes, FALSE if no

SEE ALSO

sysLib, sysVwareBuildBootLine( ), sysVware2BuildBootLine( ), sysVware1BuildBootLine( )


wrMdpPro8xx : Routines

sysMotCpmEndLoad( )

NAME

sysMotCpmEndLoad( ) - load an istance of the motCpmEnd driver

SYNOPSIS

END_OBJ *sysMotCpmEndLoad
    (
    char * pParamStr,         /* ptr to initialization parameter string */
    void * unused             /* unused optional argument */
    )

DESCRIPTION

This routine loads the motCpmEnd driver with proper parameters. It also reads the BCSR3 to find out which type of processor is being used, and sets up the load string accordingly.

The END device load string formed by this routine is in the following format. motCpmAddr:ivec:sccNum:txBdNum:rxBdNum:txBdBase:rxBdBase: bufBase

This routine only loads and initializes one instance of the device. If the user wishes to use more than one motCpmEnd devices, this routine should be changed.

RETURNS

pointer to END object or NULL.

SEE ALSO

sysLib, motCpmEndLoad ()


wrMdpPro8xx : Routines

sysCpmEnetDisable( )

NAME

sysCpmEnetDisable( ) - disable the Ethernet controller

SYNOPSIS

void sysCpmEnetDisable
    (
    int unit
    )

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, sysCpmEnetEnable( )


wrMdpPro8xx : Routines

sysCpmEnetEnable( )

NAME

sysCpmEnetEnable( ) - enable the Ethernet controller

SYNOPSIS

STATUS sysCpmEnetEnable
    (
    int unit
    )

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, sysCpmEnetDisable( )


wrMdpPro8xx : Routines

sysCpmEnetAddrGet( )

NAME

sysCpmEnetAddrGet( ) - get the hardware Ethernet address

SYNOPSIS

STATUS sysCpmEnetAddrGet
    (
    int     unit,             /* not used - only slave SCC1 is wired to port */
    UINT8 * pAddr             /* Location address is returned in */
    )

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


wrMdpPro8xx : Routines

sysCpmEnetCommand( )

NAME

sysCpmEnetCommand( ) - issue a command code to the ethernet controller.

SYNOPSIS

STATUS sysCpmEnetCommand
    (
    int    unit,
    UINT16 command            /* Command to be issued */
    )

DESCRIPTION

This routine issue a command code to the ethernet controller.

RETURNS

OK

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysCpmEnetIntDisable( )

NAME

sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt

SYNOPSIS

void sysCpmEnetIntEnable
    (
    int unit
    )

DESCRIPTION

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

RETURNS

N/A.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysCpmEnetIntDisable( )

NAME

sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt

SYNOPSIS

void sysCpmEnetIntDisable
    (
    int unit
    )

DESCRIPTION

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

RETURNS

N/A.

SEE ALSO

sysLib


wrMdpPro8xx : 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


wrMdpPro8xx : Routines

sysNetHwInit( )

NAME

sysNetHwInit( ) - initialize the network interface

SYNOPSIS

void sysNetHwInit (void)

DESCRIPTION

This routine initializes the network hardware to a quiescent state. It does not connect interrupts.

Only polled mode operation is possible after calling this routine. Interrupt mode operation is possible after the memory system has been initialized and sysNetHwInit2( ) has been called.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysNetHwInit2( )

NAME

sysNetHwInit2( ) - initialize additional features of the network interface

SYNOPSIS

void sysNetHwInit2 (void)

DESCRIPTION

This routine completes initialization needed for interrupt mode operation of the network device drivers. Interrupt handlers can be connected. Interrupt or DMA operations can begin.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysEnetAddrGet( )

NAME

sysEnetAddrGet( ) - gets the 6 byte ethernet address

SYNOPSIS

STATUS sysEnetAddrGet
    (
    int     unit,             /* not used - only slave SCC1 is wired to port */
    UINT8 * pAddr             /* LOcation address is returned in */
    )

DESCRIPTION

This routine gets the 6 byte ethernet address used by the ethernet device.

RETURNS

OK

SEE ALSO

sysLib, sysEnetAddrSet( )


wrMdpPro8xx : Routines

sysEnetAddrSet( )

NAME

sysEnetAddrSet( ) - sets the 6 byte ethernet address

SYNOPSIS

void sysEnetAddrSet
    (
    UCHAR byte5,
    UCHAR byte4,
    UCHAR byte3,
    UCHAR byte2,
    UCHAR byte1,
    UCHAR byte0
    )

DESCRIPTION

This routine sets the 6 byte ethernet address used by the ethernet device.

RETURNS

OK

SEE ALSO

sysLib, sysEnetAddrGet( )


wrMdpPro8xx : 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


wrMdpPro8xx : Routines

sysBspRev( )

NAME

sysBspRev( ) - return the BSP version and revision number

SYNOPSIS

char *sysBspRev (void)

DESCRIPTION

This routine returns a pointer to a BSP version and revision number, for example, 1.2/0. BSP_REV is concatenated to BSP_VERSION and returned.

RETURNS

A pointer to the BSP version/revision string.

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysHwInit( )

NAME

sysHwInit( ) - initialize the system hardware

SYNOPSIS

void sysHwInit (void)

DESCRIPTION

This routine initializes various feature of the EST MPC8260 board. 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


wrMdpPro8xx : 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.

Normally, the user specifies the amount of physical memory with the macro LOCAL_MEM_SIZE in config.h. BSPs that support run-time memory sizing do so only if the macro LOCAL_MEM_AUTOSIZE is defined. If not defined, then LOCAL_MEM_SIZE is assumed to be, and must be, the true size of physical memory.

NOTE

Do no adjust LOCAL_MEM_SIZE to reserve memory for application use. See sysMemTop( ) for more information on reserving memory.

RETURNS

The address of the top of physical memory.

SEE ALSO

sysLib, sysMemTop( )


wrMdpPro8xx : 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


wrMdpPro8xx : 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 by 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


wrMdpPro8xx : Routines

sysHwInit2( )

NAME

sysHwInit2( ) - initialize additional system hardware

SYNOPSIS

void sysHwInit2 (void)

DESCRIPTION

This routine connects system interrupt vectors and configures any required features not configured by sysHwInit( ).

RETURNS

N/A

SEE ALSO

sysLib


wrMdpPro8xx : 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( )


wrMdpPro8xx : 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. It also maps local resources onto the VMEbus.

RETURNS

N/A

SEE ALSO

sysLib, sysProcNumGet( )


wrMdpPro8xx : Routines

sysCpuNum( )

NAME

sysCpuNum( ) - determines CPU Number: 860,823, etc.

SYNOPSIS

int sysCpuNum (void)

DESCRIPTION

This routine determines CPU Number: 860,823, etc.

RETURNS

CPU num

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysCpuType( )

NAME

sysCpuType( ) - determines the 8xx CPU type

SYNOPSIS

BOOL sysCpuType
    (
    int cpuType
    )

DESCRIPTION

This routine determines the 8xx CPU type

RETURNS

CPU type

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysClkRateAdjust( )

NAME

sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu frequency

SYNOPSIS

void sysClkRateAdjust
    (
    int * sysDecClkFrequency
    )

DESCRIPTION

This routine calculates proper decrementer frequency for a cpu frequency

RETURNS

Speed in Hz

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysCpuSpeed( )

NAME

sysCpuSpeed( ) - determines operating frequence via PLPRCR Register

SYNOPSIS

UINT32 sysCpuSpeed (void)

DESCRIPTION

This routine determines operating frequence via PLPRCR Register

RETURNS

CPU speed in Hz

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysCpuSpeedAdjust( )

NAME

sysCpuSpeedAdjust( ) - change CPU Speed via PLPRCR

SYNOPSIS

void sysCpuSpeedAdjust
    (
    UINT32 speedMhz
    )

DESCRIPTION

This routine change CPU Speed via PLPRCR

NOTE

UPM values must be set for worst-case scenario (eg. 50Mhz)

RETURNS

N/A

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysCpmReset( )

NAME

sysCpmReset( ) - issues a CPM reset command

SYNOPSIS

void sysCpmReset (void)

DESCRIPTION

This routine issues a CPM reset command

RETURNS

N/A

SEE ALSO

sysLib


wrMdpPro8xx : 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.

RETURNS

N/A

SEE ALSO

sysLib


wrMdpPro8xx : 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


wrMdpPro8xx : 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 intEnable.

RETURNS

OK or ERROR

SEE ALSO

sysLib


wrMdpPro8xx : Routines

sysIntDisablePIC( )

NAME

sysIntDisablePIC( ) - disable an ISA/PCI interrupt

SYNOPSIS

STATUS sysIntDisablePIC
    (
    int intNum
    )

DESCRIPTION

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

RETURNS

OK or ERROR

SEE ALSO

sysLib