VxWorks BSP Reference : wrSbc8260

sysLib [wrSbc8260]

NAME

sysLib [wrSbc8260] - system-dependent library

ROUTINES

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
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
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
m82xxDpramLibInit( ) - init DPRAM memory allocation driver
m82xxDpramMalloc( ) - allocate memory from DPRAM main pool
m82xxDpramAlignedMalloc( ) - allocate aligned memory from DPRAM main pool
m82xxDpramFree( ) - free allocated memory from DPRAM main pool
m82xxDpramFccMalloc( ) - allocate memory from DPRAM FCC special pool
m82xxDpramFccFree( ) - free allocated memory from DPRAM FCC special pool
smc8260DevInit( ) - initialize the SMC
smc8260Int( ) - handle an SMC interrupt
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 serail device
m8260IntrInit( ) - initialize the interrupt manager for the PowerPC 8260
m8260IntEnable( ) - enable the indicated interrupt
m8260IntDisable( ) - Disable one of the Level or IRQ interrupts into the SIU
m8260IvecToInum( ) - get the relevant interrupt number
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
sysLedInit( ) - Initialize LEDs.
sysLedOff( ) - Turn selected LED off.
sysLedOn( ) - Turn selected LED on.
sysLedControl( ) - Turn selected LED(s) on or off.
sysIOPortWritePin( ) - write to pin
sysIOPortReadPin( ) - read from pin
sysIOPortGetPortAdrs( ) - get port address
sysIOPortConnectISR( ) - Connect port C to ISR
sysCacheLock( ) - locks specified data/instruction region
sysCacheUnlock( ) - Unlocks the previous locked cache
sysCheckIfVware( ) - check if we were lunched by vWARE
sysEnetAddrSet( ) - sets the 6 byte ethernet address
sysEnetAddrGet( ) - gets the 6 byte ethernet address
sysMotFccEndLoad( ) - load an istance of the motFccEnd driver
sysFccEnetEnable( ) - enable the MII interface to the FCC controller
sysFccEnetDisable( ) - disable MII interface to the FCC controller
sysFccEnetAddrGet( ) - get the hardware Ethernet address
sysFccEnetCommand( ) - issue a command to the Ethernet interface controller
sysFccMiiBitWr( ) - write one bit to the MII interface
sysFccMiiBitRd( ) - read one bit from the MII interface
sysMotSccEndLoad( ) - load an istance of the m8260SccEnd driver
sysSccEnetDisable( ) - disable the Ethernet controller
sysSccEnetIntDisable( ) - disable the Ethernet interface interrupt
sysSccEnetEnable( ) - enable the Ethernet controller
sysSccEnetAddrGet( ) - gets the 6 byte ethernet address used by the ethernet device
sysSccEnetCommand( ) - issue a command to the Ethernet interface controller
sysSccEnetIntEnable( ) - enable the Ethernet interface interrupt
sysSccEnetIntClear( ) - clear the Ethernet interface interrupt
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
vxImmrSet( ) - Set the IMMR to a specific value
vxImmrGet( ) - return the current IMMR value
sysBaudClkFreq( ) - returns the frequency of the BRG clock
sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu
sysInputFreqGet( ) - determines the Input Oscillator clock frequency
sysCpmFreqGet( ) - determines the CPM operating frequency
sysCoreFreqGet( ) - determines the Core operating frequency
sysModckHGet( ) - determines the value of MODCK_H reset configuration value
sysModck13Get( ) - determines the value of MODCK[1-3] reset configuration value
sysChipRev( ) - determines revision of Chip installed
sysCpmReset( ) - issues a CPM reset command
sysUserSwitchGet( ) - returns the value of the User Dip Switch

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.


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


wrSbc8260 : Routines

m82xxDpramLibInit( )

NAME

m82xxDpramLibInit( ) - init DPRAM memory allocation driver

SYNOPSIS

void m82xxDpramLibInit (void)

DESCRIPTION

This routine init the DPRAM memory allocation driver.

RETURNS

N/A

SEE ALSO

sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )


wrSbc8260 : Routines

m82xxDpramMalloc( )

NAME

m82xxDpramMalloc( ) - allocate memory from DPRAM main pool

SYNOPSIS

void * m82xxDpramMalloc
    (
    size_t length
    )

DESCRIPTION

This routine allocate memory from DPRAM main pool.

RETURNS

pointer to allocated memory

SEE ALSO

sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )


wrSbc8260 : Routines

m82xxDpramAlignedMalloc( )

NAME

m82xxDpramAlignedMalloc( ) - allocate aligned memory from DPRAM main pool

SYNOPSIS

void * m82xxDpramAlignedMalloc
    (
    size_t length,
    size_t alignment
    )

DESCRIPTION

This routine allocate aligned memory from DRPAM main pool.

RETURNS

pointer to allocated aligend memory

SEE ALSO

sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )


wrSbc8260 : Routines

m82xxDpramFree( )

NAME

m82xxDpramFree( ) - free allocated memory from DPRAM main pool

SYNOPSIS

void m82xxDpramFree
    (
    void * addr
    )

DESCRIPTION

This routine free allocated memory from DPRAM main pool.

RETURNS

N/A

SEE ALSO

sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )


wrSbc8260 : Routines

m82xxDpramFccMalloc( )

NAME

m82xxDpramFccMalloc( ) - allocate memory from DPRAM FCC special pool

SYNOPSIS

void * m82xxDpramFccMalloc
    (
    size_t length,
    size_t alignment
    )

DESCRIPTION

This routine allocate memory from DPRAM FCC special pool.

RETURNS

pointer to allocated memory

SEE ALSO

sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccFree( )


wrSbc8260 : Routines

m82xxDpramFccFree( )

NAME

m82xxDpramFccFree( ) - free allocated memory from DPRAM FCC special pool

SYNOPSIS

void m82xxDpramFccFree
    (
    void * addr
    )

DESCRIPTION

This routine free alocated memory from DPRAM FCC special pool.

RETURNS

pointer to allocated memory

SEE ALSO

sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( )


wrSbc8260 : Routines

smc8260DevInit( )

NAME

smc8260DevInit( ) - initialize the SMC

SYNOPSIS

void smc8260DevInit
    (
    PPC8260SMC_CHAN * pChan
    )

DESCRIPTION

This routine is called to initialize the chip to a quiescent state. Note that the smcNum field of PPC8260SMC_CHAN must be either 1 or 2.

RETURNS

N/A.

SEE ALSO

sysLib


wrSbc8260 : Routines

smc8260Int( )

NAME

smc8260Int( ) - handle an SMC interrupt

SYNOPSIS

void smc8260Int
    (
    PPC8260SMC_CHAN * pChan
    )

DESCRIPTION

This routine is called to handle SMC interrupts.

RETURNS

N/A

SEE ALSO

sysLib


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

RETURNS

N/A

SEE ALSO

sysLib, sysHwInit( )


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


wrSbc8260 : Routines

sysSerialChanGet( )

NAME

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

SYNOPSIS

SIO_CHAN * sysSerialChanGet
    (
    int channel               /* serial channel - [0, 1] */
    )

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


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


wrSbc8260 : Routines

m8260IntrInit( )

NAME

m8260IntrInit( ) - initialize the interrupt manager for the PowerPC 8260

SYNOPSIS

STATUS m8260IntrInit ()

DESCRIPTION

This routine connects the default demultiplexer, m8260IntrDeMux( ), 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 unit are enabled, CICR is setup so that SCC1 has the highest relative interrupt priority, through SCC4 with the lowest.

RETURN

OK always

SEE ALSO

sysLib


wrSbc8260 : Routines

m8260IntEnable( )

NAME

m8260IntEnable( ) - enable the indicated interrupt

SYNOPSIS

int m8260IntEnable
    (
    int intNum                /* interrupt level to enable */
    )

DESCRIPTION

This routine will enable the indicated interrupt by setting the appropriate bit in the SIU Interrupt Mask Registers.

The design of the 8260 presents the following design requirements:

1. the mapping from interrupt number to mask bit can not be represented by
   a function. An array, indexed by interrupt number (INUM), is used to map
   the interrupt number to the appropriate mask. 

2. There are two 32 bit mask registers (SIMR_L and SIMR_H). The interrupt
   number must be compared to 4 ranges to determine which register contains
   its mask bit:

  interrupt number
  in m8260IntrCtl.h       register
  ----------------        -------
  0-15                    SIMR_L
  16-31                   SIMR_H
  32-47                   SIMR_L
  48-63                   SIMR_H

RETURNS

0, always.

SEE ALSO

sysLib


wrSbc8260 : Routines

m8260IntDisable( )

NAME

m8260IntDisable( ) - Disable one of the Level or IRQ interrupts into the SIU

SYNOPSIS

int m8260IntDisable
    (
    int intNum                /* interrupt level to disable */
    )

DESCRIPTION

This routine will mask the bit in the SIMASK register corresponding to the requested interrupt level.

RETURNS

0, always.

SEE ALSO

sysLib


wrSbc8260 : Routines

m8260IvecToInum( )

NAME

m8260IvecToInum( ) - get the relevant interrupt number

SYNOPSIS

int m8260IvecToInum
    (
    VOIDFUNCPTR * vector      /* interrupt vector to attach to */
    )

DESCRIPTION

This routine finds out the interrupt number associated with the vector in vector.

vector types are defined in h/drv/intrClt/m8260Intr.h.

RETURNS

the interrupt number for the vector

SEE ALSO

sysLib, m8260Intr.h


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


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


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


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


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


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


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


wrSbc8260 : Routines

sysAuxClkEnable( )

NAME

sysAuxClkEnable( ) - turn on auxiliary clock interrupts

SYNOPSIS

void sysAuxClkEnable (void)

DESCRIPTION

This routine enables auxiliary clock interrupts. The timer is used in "reference mode" i.e. a value is programmed into the reference register and an interrupt occurs when the timer reaches that value.

RETURNS

N/A

SEE ALSO

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


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


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


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


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


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


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


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

RETURNS

The timestamp timer clock frequency, in ticks per second.

SEE ALSO

sysLib


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


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


wrSbc8260 : Routines

sysLedInit( )

NAME

sysLedInit( ) - Initialize LEDs.

SYNOPSIS

void sysLedInit (void)

DESCRIPTION

This routine initializes the LED variable to zero and clears all LEDs.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedOn( ), sysLedOff( ), sysLedControl( ).


wrSbc8260 : Routines

sysLedOff( )

NAME

sysLedOff( ) - Turn selected LED off.

SYNOPSIS

void sysLedOff
    (
    UINT8 led
    )

DESCRIPTION

This routine set the selected LED to off.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedInit( ), sysLedOff( ), sysLedControl( ).


wrSbc8260 : Routines

sysLedOn( )

NAME

sysLedOn( ) - Turn selected LED on.

SYNOPSIS

void sysLedOn
    (
    UINT8 led
    )

DESCRIPTION

This routine set the selected LED to on.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedInit( ), sysLedOn( ), sysLedControl( ).


wrSbc8260 : Routines

sysLedControl( )

NAME

sysLedControl( ) - Turn selected LED(s) on or off.

SYNOPSIS

void sysLedControl
    (
    int   ledOn,
    UINT8 led
    )

DESCRIPTION

This routine sets the selected LED on or off.

RETURNS

N/A.

SEE ALSO

sysLib, sysLedInit( ), sysLedOff( ), sysLedOn( ).


wrSbc8260 : Routines

sysIOPortWritePin( )

NAME

sysIOPortWritePin( ) - write to pin

SYNOPSIS

void sysIOPortWritePin
    (
    char  port,
    UINT8 pin,
    BOOL  high
    )

DESCRIPTION

This routine write to the I/O pin.

RETURNS

None

SEE ALSO

sysLib, sysIOPortCISR( ), sysIOPortGetPortAdrs( ), sysIOPortReadPin( ), sysIOPortConnectISR( )


wrSbc8260 : Routines

sysIOPortReadPin( )

NAME

sysIOPortReadPin( ) - read from pin

SYNOPSIS

STATUS sysIOPortReadPin
    (
    char  port,
    UINT8 pin
    )

DESCRIPTION

This routine read the data from an I/O pin.

RETURNS

OK or ERROR

SEE ALSO

sysLib, sysIOPortCISR( ), sysIOPortGetPortAdrs( ), sysIOPortWritePin( ), sysIOPortConnectISR( )


wrSbc8260 : Routines

sysIOPortGetPortAdrs( )

NAME

sysIOPortGetPortAdrs( ) - get port address

SYNOPSIS

UINT32 sysIOPortGetPortAdrs
    (
    char  port,
    UINT8 portNum
    )

DESCRIPTION

This routine get the port address.

RETURNS

Port address

SEE ALSO

sysLib, sysIOPortCISR( ), sysIOPortReadPin( ), sysIOPortWritePin( ), sysIOPortConnectISR( )


wrSbc8260 : Routines

sysIOPortConnectISR( )

NAME

sysIOPortConnectISR( ) - Connect port C to ISR

SYNOPSIS

void sysIOPortConnectISR (void)

DESCRIPTION

This routine connect port C to the ISR.

NOTE

In the following example the function sysIOPortConnectISR is used
      to configure the interrupt and connect the handler. Pin A32 is 
      connected to pin C32 and calls to sysIOPortWritePin(A, 32, 1) 
      and then sysIOPortWritePin(A, 32, 0) are used to transition pin 
      A32 state and generate an interrupt through pin C32. Because the 
      SIEXR bit is high, the interrupt will only occur on a high to low 
      transition.

RETURNS

None

SEE ALSO

sysLib, sysIOPortCISR( ), sysIOPortGetPortAdrs( ), sysIOPortWritePin( ), sysIOPortReadPin( )


wrSbc8260 : Routines

sysCacheLock( )

NAME

sysCacheLock( ) - locks specified data/instruction region

SYNOPSIS

STATUS sysCacheLock
    (
    CACHE_TYPE cacheType,
    void *     adrs,
    UINT32     bytes
    )

DESCRIPTION

This routine locks the specified region into the cache, cacheType. The region to be locked is specified by the start address, adrs, and the size, bytes. The region -- the start address, and size -- must be aligned on a 32-byte boundary.

Multiple calls to this routine will silently unlock the specified cache to lock the new region.

RETURNS

OK or error if cache is locked, or if cache is not supported.

SEE ALSO

sysLib, sysCacheUnlock( )


wrSbc8260 : Routines

sysCacheUnlock( )

NAME

sysCacheUnlock( ) - Unlocks the previous locked cache

SYNOPSIS

STATUS sysCacheUnlock
    (
    CACHE_TYPE cacheType
    )

DESCRIPTION

This routines unlocks the specified cache, cacheType

RETURNS

OK or error if cache is not supported.

SEE ALSO

sysLib, sysCacheLock( )


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


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

N/A

SEE ALSO

sysLib, sysEnetAddrGet( )


wrSbc8260 : Routines

sysEnetAddrGet( )

NAME

sysEnetAddrGet( ) - gets the 6 byte ethernet address

SYNOPSIS

STATUS sysEnetAddrGet
    (
    int unit ,                /* not used */
    UINT8 *  addr             /* 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( )


wrSbc8260 : Routines

sysMotFccEndLoad( )

NAME

sysMotFccEndLoad( ) - load an istance of the motFccEnd driver

SYNOPSIS

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

DESCRIPTION

This routine loads the motFccEnd 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. immrVal:fccNum:bdBase:bdSize:bufBase:bufSize:fifoTxBase :fifoRxBase:tbdNum:rbdNum:phyAddr:phyDefMode:pAnOrderTbl: userFlags:mBlkRatio:mBlkRatio

immrVal
Internal memory address
fccNum
FCC number being used
bdBase
buffer descriptors base address
bdSize
buffer descriptors space size
bufBase
data buffers base address
bufSize
data buffers space size
fifoTxBase
tx buffer in internal memory
fifoRxBase
rx buffer in internal memory
tbdNum
number of TBDs or NONE
rbdNum
number of RBDs or NONE
phyAddr
address of a MII-compliant PHY device
phyDefMode
default operating mode of a MII-compliant PHY device
pAnOrderTbl
auto-negotiation order table for a MII-compliant PHY device or NONE
userFlags
User flages
mBlkRatio
Ratio between mBlk's and Rx BD's
clusterRatio
Ratio between Clusters and Rx BD's

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

RETURNS

pointer to END object or NULL.

SEE ALSO

sysLib, motFccEndLoad ()


wrSbc8260 : Routines

sysFccEnetEnable( )

NAME

sysFccEnetEnable( ) - enable the MII interface to the FCC controller

SYNOPSIS

STATUS sysFccEnetEnable
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum             /* FCC being used */
    )

DESCRIPTION

This routine is expected to perform any target specific functions required to enable the Ethernet device and to connect the MII interface to the FCC.

RETURNS

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

SEE ALSO

sysLib


wrSbc8260 : Routines

sysFccEnetDisable( )

NAME

sysFccEnetDisable( ) - disable MII interface to the FCC controller

SYNOPSIS

STATUS sysFccEnetDisable
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum             /* FCC being used */
    )

DESCRIPTION

This routine is expected to perform any target specific functions required to disable the Ethernet device and the MII interface to the FCC controller. This involves restoring the default values for all the Port B and C signals.

RETURNS

OK, always.

SEE ALSO

sysLib


wrSbc8260 : Routines

sysFccEnetAddrGet( )

NAME

sysFccEnetAddrGet( ) - get the hardware Ethernet address

SYNOPSIS

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

DESCRIPTION

This routine provides the six byte Ethernet hardware address that will be used by each individual FCC 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


wrSbc8260 : Routines

sysFccEnetCommand( )

NAME

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

SYNOPSIS

STATUS sysFccEnetCommand
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum,            /* FCC being used */
    UINT16 command
    )

DESCRIPTION

this routine issue a command to the Ethernet interface controller

RETURNS

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

SEE ALSO

sysLib


wrSbc8260 : Routines

sysFccMiiBitWr( )

NAME

sysFccMiiBitWr( ) - write one bit to the MII interface

SYNOPSIS

STATUS sysFccMiiBitWr
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum,            /* FCC being used */
    INT32  bitVal             /* the bit being written */
    )

DESCRIPTION

This routine writes the value in bitVal to the MDIO line of a MII interface. The MDC line is asserted for a while, and then negated. If bitVal is NONE, then the MDIO pin should be left in high-impedance state.

SEE ALSO

sysLib, sysFccMiiBitRd( )

RETURNS

OK, or ERROR.


wrSbc8260 : Routines

sysFccMiiBitRd( )

NAME

sysFccMiiBitRd( ) - read one bit from the MII interface

SYNOPSIS

STATUS sysFccMiiBitRd
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum,            /* FCC being used */
    INT8 * bitVal             /* the bit being read */
    )

DESCRIPTION

This routine reads one bit from the MDIO line of a MII interface. The MDC line is asserted for a while, and then negated.

SEE ALSO

sysLib, sysFccMiiBitWr( )

RETURNS

OK, or ERROR.


wrSbc8260 : Routines

sysMotSccEndLoad( )

NAME

sysMotSccEndLoad( ) - load an istance of the m8260SccEnd driver

SYNOPSIS

END_OBJ * sysMotSccEndLoad
    (
    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

motCpmAddr
Internal memory address
ivec
Interrupt vector
sccNum
SCC number being used
txBdNum
number of TBDs or NULL
rxBdNum
number of RBDs or NULL
txBdBase
base location of the TBDs
rxBdBase
base location of the RBDs
bufBase
address of the shared memory region

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


wrSbc8260 : Routines

sysSccEnetDisable( )

NAME

sysSccEnetDisable( ) - disable the Ethernet controller

SYNOPSIS

void sysSccEnetDisable
    (
    int unit                  /* not used - only slave SCC1 is wired to port */
    )

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


wrSbc8260 : Routines

sysSccEnetIntDisable( )

NAME

sysSccEnetIntDisable( ) - disable the Ethernet interface interrupt

SYNOPSIS

void sysSccEnetIntDisable
    (
    int unit
    )

DESCRIPTION

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

RETURNS

N/A.

SEE ALSO

sysLib


wrSbc8260 : Routines

sysSccEnetEnable( )

NAME

sysSccEnetEnable( ) - enable the Ethernet controller

SYNOPSIS

STATUS sysSccEnetEnable
    (
    int unit                  /* not used - only slave SCC1 is wired to port */
    )

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


wrSbc8260 : Routines

sysSccEnetAddrGet( )

NAME

sysSccEnetAddrGet( ) - gets the 6 byte ethernet address used by the ethernet device

SYNOPSIS

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

DESCRIPTION

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

RETURNS

OK, or ERROR

SEE ALSO

sysLib


wrSbc8260 : Routines

sysSccEnetCommand( )

NAME

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

SYNOPSIS

STATUS sysSccEnetCommand
    (
    int    unit,
    UINT16 command
    )

DESCRIPTION

The routine issue a command to the Ethernet interface controller.

RETURNS

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

SEE ALSO

sysLib


wrSbc8260 : Routines

sysSccEnetIntEnable( )

NAME

sysSccEnetIntEnable( ) - enable the Ethernet interface interrupt

SYNOPSIS

void sysSccEnetIntEnable
    (
    int unit
    )

DESCRIPTION

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

RETURNS

N/A.

SEE ALSO

sysLib


wrSbc8260 : Routines

sysSccEnetIntClear( )

NAME

sysSccEnetIntClear( ) - clear the Ethernet interface interrupt

SYNOPSIS

void sysSccEnetIntClear
    (
    int unit
    )

DESCRIPTION

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

RETURNS

N/A.

SEE ALSO

sysLib


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


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


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


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


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


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


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


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


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


wrSbc8260 : Routines

vxImmrSet( )

NAME

vxImmrSet( ) - Set the IMMR to a specific value

SYNOPSIS

void vxImmrSet
    (
    UINT32 value
    )

DESCRIPTION

This routine sets the IMMR to a specific value

RETURNS

N/A

SEE ALSO

sysLib


wrSbc8260 : Routines

vxImmrGet( )

NAME

vxImmrGet( ) - return the current IMMR value

SYNOPSIS

UINT32 vxImmrGet (void)

DESCRIPTION

This routine returns the current IMMR value

RETURNS

current IMMR value

SEE ALSO

sysLib


wrSbc8260 : Routines

sysBaudClkFreq( )

NAME

sysBaudClkFreq( ) - returns the frequency of the BRG clock

SYNOPSIS

int sysBaudClkFreq (void)

DESCRIPTION

This routine returns the frequency of the BRG clock

NOTE

From page 9-5 in Rev0 of 8260 book

      baud clock = 2*cpm_freq/2^2*(DFBRG+1) where DFBRG = 01
                 = 2*cpm_freq/16

RETURNS

Frequence in HZ

SEE ALSO

sysLib


wrSbc8260 : Routines

sysClkRateAdjust( )

NAME

sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu

SYNOPSIS

void sysClkRateAdjust
    (
    int * sysDecClkFrequency
    )

DESCRIPTION

frequency

This routine calculates proper decrementer frequency for a cpu frequency

RETURNS

Speed in Hz

SEE ALSO

sysLib


wrSbc8260 : Routines

sysInputFreqGet( )

NAME

sysInputFreqGet( ) - determines the Input Oscillator clock frequency

SYNOPSIS

UINT32 sysInputFreqGet (void)

DESCRIPTION

This routine determines the Input Oscillator clock frequency

NOTE

From page 9-2 in Rev0 of 8260 book

RETURNS

Input frequency in HZ

SEE ALSO

sysLib


wrSbc8260 : Routines

sysCpmFreqGet( )

NAME

sysCpmFreqGet( ) - determines the CPM operating frequency

SYNOPSIS

UINT32 sysCpmFreqGet (void)

DESCRIPTION

This routine determines the CPM operating frequency

NOTE

From page 9-2 in Rev0 of 8260 book

RETURNS

CPM frequency in HZ

SEE ALSO

sysLib


wrSbc8260 : Routines

sysCoreFreqGet( )

NAME

sysCoreFreqGet( ) - determines the Core operating frequency

SYNOPSIS

UINT32 sysCoreFreqGet (void)

DESCRIPTION

This routine determines the Core operating frequency

NOTE

From page 9-2 in Rev0 of 8260 book

RETURNS

Core frequency in HZ

SEE ALSO

sysLib


wrSbc8260 : Routines

sysModckHGet( )

NAME

sysModckHGet( ) - determines the value of MODCK_H reset configuration value

SYNOPSIS

UINT8 sysModckHGet (void)

DESCRIPTION

This routine determines the value of MODCK_H reset configuration value

NOTE

From page 9-2 in Rev0 of 8260 book

RETURNS

MODCK_H value

SEE ALSO

sysLib


wrSbc8260 : Routines

sysModck13Get( )

NAME

sysModck13Get( ) - determines the value of MODCK[1-3] reset configuration value

SYNOPSIS

UINT8 sysModck13Get (void)

DESCRIPTION

This routine determines the value of MODCK[1-3] reset configuration value

NOTE

From Clock Configuration Modes 8260 Manual
      User Dip Switch 6,7, and 8 must match Config Switch 6,7, 8

RETURNS

MODCK[1-3] value

SEE ALSO

sysLib


wrSbc8260 : Routines

sysChipRev( )

NAME

sysChipRev( ) - determines revision of Chip installed

SYNOPSIS

UINT32 sysChipRev (void)

DESCRIPTION

This routine determines revision of Chip installed

RETURNS

Chip revision

SEE ALSO

sysLib


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


wrSbc8260 : Routines

sysUserSwitchGet( )

NAME

sysUserSwitchGet( ) - returns the value of the User Dip Switch

SYNOPSIS

UINT8 sysUserSwitchGet (void)

DESCRIPTION

This routine returns the value of the User Dip Switch

NOTE

Reverse bits so S1 is MSB S8 is LSB

RETURNS

Unsigned 8 bit value

SEE ALSO

sysLib