VxWorks BSP Reference : wrScout
sysLib [wrScout] - system-dependent library: Motorola 75x/7400 with 8260 Scout
environ( ) - environment pointer
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
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
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
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
m8260SioDevInit( ) - initialize the SCC
m8260SioResetChannel( ) - initialize an SCC channel
m8260SioInt( ) - handle an SCC interrupt
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
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
sysCacheLock( ) - locks specified data/instruction region
sysCacheUnlock( ) - Unlocks the previous locked cache
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
sysMiiOptRegsHandle( ) - handle some MII optional registers
sysCheckIfVware( ) - check if we were lunched by vWARE
sysAltivecProbe( ) - Check if the CPU has ALTIVEC unit.
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the bsp version with the revision eg 1.2/x
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( ) - additional system configuration and initialization
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
vxImmrSet( ) - Set the IMMR to a specific value
vxImmrGet( ) - return the current IMMR value
sysInputFreqGet( ) - determines the Input Oscillator clock frequency
sysBaudClkFreq( ) - Obtains frequency of the BRG_CLK in HZ
sysCpuCheck( ) - confirm the CPU type
This library provides board-specific routines. The chip drivers included are:
VxWorks Programmer's Guide: Configuration
environ( ) - environment pointer
extern STATUS envLibInit ( BOOL installHooks )
The following macro is provided for code that manipulates the environment variable array directly.
sysLocalToBusAdrs( ) - convert a local address to a bus address
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 */ )
This routine gets the VMEbus address that accesses a specified local memory address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusToLocalAdrs( ) - convert a bus address to a local address
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 */ )
This routine gets the local address that accesses a specified VMEbus address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusIntAck( ) - acknowledge a bus interrupt
int sysBusIntAck ( int intLevel /* interrupt level to acknowledge */ )
This routine acknowledges a specified VMEbus interrupt level.
This routine has no effect, since there is no VMEbus.
NULL.
sysBusIntGen( ) - generate a bus interrupt
STATUS sysBusIntGen ( int level, /* bus interrupt level to generate */ int vector /* interrupt vector to return (0-255) */ )
This routine generates a VMEbus interrupt for a specified level with a specified vector.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
STATUS sysMailboxConnect ( FUNCPTR routine, /* routine called at each mailbox interrupt */ int arg /* argument with which to call routine */ )
This routine specifies the interrupt service routine to be called at each mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysMailboxEnable( ) - enable the mailbox interrupt
STATUS sysMailboxEnable ( INT8 * mailboxAdrs /* mailbox address */ )
This routine enables the mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysBusTas( ) - test and set a location across the bus
BOOL sysBusTas ( INT8 * addr /* address to be tested and set */ )
This routine performs a test-and-set (TAS) instruction across the backplane.
This routine is equivalent to vxTas( ), since there is no VMEbus.
TRUE if the value had not been set but is now, or FALSE if the value was set already.
m8260IntrInit( ) - initialize the interrupt manager for the PowerPC 8260
STATUS m8260IntrInit ()
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.
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.
OK always
m8260IntEnable( ) - enable the indicated interrupt
int m8260IntEnable ( int intNum /* interrupt level to enable */ )
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
0, always.
m8260IntDisable( ) - Disable one of the Level or IRQ interrupts into the SIU
int m8260IntDisable ( int intNum /* interrupt level to disable */ )
This routine will mask the bit in the SIMASK register corresponding to the requested interrupt level.
0, always.
m8260IvecToInum( ) - get the relevant interrupt number
int m8260IvecToInum ( VOIDFUNCPTR * vector /* interrupt vector to attach to */ )
This routine finds out the interrupt number associated with the vector in vector.
vector types are defined in h/drv/intrClt/m8260Intr.h.
the interrupt number for the vector
sysLib, m8260Intr.h
m82xxDpramLibInit( ) - init DPRAM memory allocation driver
void m82xxDpramLibInit (void)
This routine init the DPRAM memory allocation driver.
N/A
sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )
m82xxDpramMalloc( ) - allocate memory from DPRAM main pool
void * m82xxDpramMalloc ( size_t length )
This routine allocate memory from DPRAM main pool.
pointer to allocated memory
sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )
m82xxDpramAlignedMalloc( ) - allocate aligned memory from DPRAM main pool
void * m82xxDpramAlignedMalloc ( size_t length, size_t alignment )
This routine allocate aligned memory from DRPAM main pool.
pointer to allocated aligend memory
sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )
m82xxDpramFree( ) - free allocated memory from DPRAM main pool
void m82xxDpramFree ( void * addr )
This routine free allocated memory from DPRAM main pool.
N/A
sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFccMalloc( ), m82xxDpramFccFree( )
m82xxDpramFccMalloc( ) - allocate memory from DPRAM FCC special pool
void * m82xxDpramFccMalloc ( size_t length, size_t alignment )
This routine allocate memory from DPRAM FCC special pool.
pointer to allocated memory
sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccFree( )
m82xxDpramFccFree( ) - free allocated memory from DPRAM FCC special pool
void m82xxDpramFccFree ( void * addr )
This routine free alocated memory from DPRAM FCC special pool.
pointer to allocated memory
sysLib, m82xxDpramAlignedAddr( ), m82xxDpramAllocRange( ), m82xxDpramFindFreeEntry( ), m82xxDpramAllocateRange( ), m82xxDpramReleaseRenage( ), m82xxDpramLibInit( ), m82xxDpramMalloc( ), m82xxDpramAlignedMalloc( ), m82xxDpramFree( ), m82xxDpramFccMalloc( )
sysSerialHwInit( ) - initialize the BSP serial devices to a quiesent state
void sysSerialHwInit (void)
This routine initializes the BSP serial device descriptors and puts the devices in a quiesent state. It is called from sysHwInit( ) with interrupts locked.
N/A
sysSerialHwInit2( ) - connect BSP serial device interrupts
void sysSerialHwInit2 (void)
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( ).
N/A
sysLib, sysHwInit2( )
sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel
SIO_CHAN * sysSerialChanGet ( int channel /* serial channel */ )
This routine gets the SIO_CHAN device associated with a specified serial channel.
A pointer to the SIO_CHAN structure for the channel, or ERROR if the channel is invalid.
sysSerialReset( ) - reset the serail device
void sysSerialReset (void)
This function calls sysSerialHwInit( ) to reset the serail device
N/A
m8260SioDevInit( ) - initialize the SCC
void m8260SioDevInit ( M8260_SCC_CHAN * pSccChan )
This routine is called to initialize the chip to a quiescent state. Note that the sccNum field of M8260_SCC_CHAN must be less than or equal to the maximum number of SCC channels to configure as SIOs, as defined in ads8260.h
m8260SioResetChannel( ) - initialize an SCC channel
void m8260SioResetChannel ( M8260_SCC_CHAN * pSccChan )
This routines initializes an SCC channel. Initialized are:
CPCR BRGC Baud rate Buffer Descriptors RBASE field in SCC Parameter RAM TBASE field in SCC Parameter RAM RFCR field in SCC Parameter RAM TFCR field in SCC Parameter RAM MRBLR field in SCC Parameter RAM SCC mode registers: GSMR_L, GSMR_H, AND PSMR transmit and receive interrupts are enabled in SCCM RETURNS: NA
m8260SioInt( ) - handle an SCC interrupt
void m8260SioInt ( M8260_SCC_CHAN * pSccChan )
This routine is called to handle SCC interrupts.
NA
sysClkConnect( ) - connect a routine to the system clock interrupt
STATUS sysClkConnect ( FUNCPTR routine, /* routine to connect */ int arg /* argument for the routine */ )
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.
OK, or ERROR if the routine cannot be connected to the interrupt.
sysLib, intConnect( ), usrClock( ), sysClkEnable( )
sysClkEnable( ) - turn on system clock interrupts
void sysClkEnable (void)
This routine enables system clock interrupts.
N/A
sysLib, sysClkConnect( ), sysClkDisable( ), sysClkRateSet( )
sysClkDisable( ) - turn off system clock interrupts
void sysClkDisable (void)
This routine disables system clock interrupts.
N/A
sysLib, sysClkEnable( )
sysClkRateGet( ) - get the system clock rate
int sysClkRateGet (void)
This routine returns the system clock rate.
The number of ticks per second of the system clock.
sysLib, sysClkEnable( ), sysClkRateSet( )
sysClkRateSet( ) - set the system clock rate
STATUS sysClkRateSet ( int ticksPerSecond /* number of clock interrupts per second */ )
This routine sets the interrupt rate of the system clock. It is called by usrRoot( ) in usrConfig.c.
OK, or ERROR if the tick rate is invalid or the timer cannot be set.
sysLib, sysClkEnable( ), sysClkRateGet( )
sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt
STATUS sysAuxClkConnect ( FUNCPTR routine, /* routine called at each aux. clock interrupt */ int arg /* argument to auxiliary clock interrupt */ /* routine */ )
This routine specifies the interrupt service routine to be called at each auxiliary clock interrupt. It does not enable auxiliary clock interrupts.
OK, or ERROR if the routine cannot be connected to the interrupt.
sysLib, intConnect( ), sysAuxClkEnable( )
sysAuxClkDisable( ) - turn off auxiliary clock interrupts
void sysAuxClkDisable (void)
This routine disables auxiliary clock interrupts.
N/A
sysAuxClkEnable( ) - turn on auxiliary clock interrupts
void sysAuxClkEnable (void)
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.
N/A
sysLib, sysAuxClkConnect( ), sysAuxClkDisable( ), sysAuxClkRateSet( )
sysAuxClkRateGet( ) - get the auxiliary clock rate
int sysAuxClkRateGet (void)
This routine returns the interrupt rate of the auxiliary clock.
The number of ticks per second of the auxiliary clock.
sysLib, sysAuxClkEnable( ), sysAuxClkRateSet( )
sysAuxClkRateSet( ) - set the auxiliary clock rate
STATUS sysAuxClkRateSet ( int ticksPerSecond /* number of clock interrupts per second */ )
This routine sets the interrupt rate of the auxiliary clock. It does not enable auxiliary clock interrupts.
OK, or ERROR if the tick rate is invalid or the timer cannot be set.
sysLib, sysAuxClkEnable( ), sysAuxClkRateGet( )
sysTimestampConnect( ) - connect a user routine to the timestamp timer interrupt
STATUS sysTimestampConnect ( FUNCPTR routine, /* routine called at each timestamp timer */ /* interrupt */ int arg /* argument with which to call routine */ )
This routine specifies the user interrupt routine to be called at each timestamp timer interrupt. It does not enable the timestamp timer itself.
OK, or ERROR if sysTimestampInt( ) interrupt handler is not used.
sysTimestampEnable( ) - initialize and enable the timestamp timer
STATUS sysTimestampEnable (void)
This routine connects interrupts, and enables the timer device
TRUE always
sysTimestampDisable( ) - turn off auxiliary clock interrupts
STATUS sysTimestampDisable (void)
This routine disables auxiliary clock interrupts.
OK, always
sysTimestampPeriod( ) - get the period of a timestamp timer
UINT32 sysTimestampPeriod (void)
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.
The period of the timestamp timer in counter ticks.
sysTimestampFreq( ) - get a timestamp timer clock frequency
UINT32 sysTimestampFreq (void)
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.
The timestamp timer clock frequency, in ticks per second.
sysTimestamp( ) - get a timestamp timer tick count
UINT32 sysTimestamp (void)
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.
The current timestamp timer tick count.
sysLib, sysTimestampFreq( ), sysTimestampLock( )
sysTimestampLock( ) - lock interrupts and get the timestamp timer tick count
UINT32 sysTimestampLock (void)
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.
The current timestamp timer tick count.
sysLib, sysTimestampFreq( ), sysTimestamp( )
sysNvRamGet( ) - get the contents of non-volatile RAM
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 */ )
This routine copies the contents of non-volatile memory into a specified string. The string is terminated with an EOS.
This routine has no effect, since there is no non-volatile RAM.
ERROR, always.
sysLib, sysNvRamSet( )
sysNvRamSet( ) - write to non-volatile RAM
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 */ )
This routine copies a specified string into non-volatile RAM.
This routine has no effect, since there is no non-volatile RAM.
ERROR, always.
sysLib, sysNvRamGet( )
sysCacheLock( ) - locks specified data/instruction region
STATUS sysCacheLock ( CACHE_TYPE cacheType, void * adrs, UINT32 bytes )
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.
OK or error if cache is locked, or if cache is not supported.
sysLib, sysCacheUnlock( )
sysCacheUnlock( ) - Unlocks the previous locked cache
STATUS sysCacheUnlock ( CACHE_TYPE cacheType )
This routines unlocks the specified cache, cacheType
OK or error if cache is not supported.
sysLib, sysCacheLock( )
sysMotFccEndLoad( ) - load an istance of the motFccEnd driver
END_OBJ * sysMotFccEndLoad ( char * pParamStr, /* ptr to initialization parameter string */ void * unused /* unused optional argument */ )
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:clusterRatio
- 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.
pointer to END object or NULL.
sysLib, motFccEndLoad ()
sysFccEnetEnable( ) - enable the MII interface to the FCC controller
STATUS sysFccEnetEnable ( UINT32 immrVal, /* base address of the on-chip RAM */ UINT8 fccNum /* FCC being used */ )
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.
OK, or ERROR if the FCC controller cannot be enabled.
sysFccEnetDisable( ) - disable MII interface to the FCC controller
STATUS sysFccEnetDisable ( UINT32 immrVal, /* base address of the on-chip RAM */ UINT8 fccNum /* FCC being used */ )
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.
OK, always.
sysFccEnetAddrGet( ) - get the hardware Ethernet address
STATUS sysFccEnetAddrGet ( int unit , UINT8 * addr )
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.
OK, or ERROR if the Ethernet address cannot be returned.
sysFccEnetCommand( ) - issue a command to the Ethernet interface controller
STATUS sysFccEnetCommand ( UINT32 immrVal, /* base address of the on-chip RAM */ UINT8 fccNum, /* FCC being used */ UINT16 command )
This routine issue a command to the Ethernet interface controller.
OK, or ERROR if the Ethernet controller could not be restarted.
sysFccMiiBitWr( ) - write one bit to the MII interface
STATUS sysFccMiiBitWr ( UINT32 immrVal, /* base address of the on-chip RAM */ UINT8 fccNum, /* FCC being used */ INT32 bitVal /* the bit being written */ )
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.
sysLib, sysFccMiiBitRd( )
OK, or ERROR.
sysFccMiiBitRd( ) - read one bit from the MII interface
STATUS sysFccMiiBitRd ( UINT32 immrVal, /* base address of the on-chip RAM */ UINT8 fccNum, /* FCC being used */ INT8 * bitVal /* the bit being read */ )
This routine reads one bit from the MDIO line of a MII interface. The MDC line is asserted for a while, and then negated.
sysLib, sysFccMiiBitWr( )
OK, or ERROR.
sysMiiOptRegsHandle( ) - handle some MII optional registers
STATUS sysMiiOptRegsHandle ( PHY_INFO * pPhyInfo /* PHY control structure pointer */ )
This routine handles some MII optional registers in the PHY described by pPhyInfo.
In the case of the Scout, the PHY that implements the physical layer for the FCC is an LXT970. The default values for some of its chip-specific registers seem to be uncompatible with 100Base-T operations. This routine is expected to perform any PHY-specific functions required to bring the PHY itself to a state where 100Base-T operations may be possible.
OK, or ERROR.
sysCheckIfVware( ) - check if we were lunched by vWARE
BOOL sysCheckIfVware (void)
This routine check if we were lunched by vWARE
TRUE if yes, FALSE if no
sysLib, sysVwareBuildBootLine( ), sysVware2BuildBootLine( ), sysVware1BuildBootLine( )
sysAltivecProbe( ) - Check if the CPU has ALTIVEC unit.
int sysAltivecProbe (void)
This routine returns OK it the CPU has an ALTIVEC unit in it. Presently it checks for 7400
OK - for 7400 Processor type
ERROR - otherwise.
sysModel( ) - return the model name of the CPU board
char * sysModel (void)
This routine returns the model name of the CPU board.
A pointer to the string.
sysBspRev( ) - return the bsp version with the revision eg 1.2/x
char * sysBspRev (void)
This function returns a pointer to a bsp version with the revision. for eg. 1.2/x. BSP_REV defined in config.h is concatanated to BSP_VERSION and returned.
A pointer to the BSP version/revision string.
sysHwInit( ) - initialize the system hardware
void sysHwInit (void)
This routine initializes various feature of the MPC8260 ADS board. It sets up the control registers, initializes various devices if they are present.
This routine should not be called directly by the user.
NA
sysPhysMemTop( ) - get the address of the top of physical memory
char * sysPhysMemTop (void)
This routine returns the address of the first missing byte of memory, which indicates the top of memory.
The address of the top of physical memory.
sysMemTop( ) - get the address of the top of VxWorks memory
char * sysMemTop (void)
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.
The address of the top of VxWorks memory.
sysToMonitor( ) - transfer control to the ROM monitor
STATUS sysToMonitor ( int startType /* parameter passed to ROM to tell it how */ /* to boot */ )
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.
Does not return.
sysHwInit2( ) - additional system configuration and initialization
void sysHwInit2 (void)
This routine connects system interrupts and does any additional configuration necessary.
NA
sysProcNumGet( ) - get the processor number
int sysProcNumGet (void)
This routine returns the processor number for the CPU board, which is set with sysProcNumSet( ).
The processor number for the CPU board.
sysLib, sysProcNumSet( )
sysProcNumSet( ) - set the processor number
void sysProcNumSet ( int procNum /* processor number */ )
This routine sets the processor number for the CPU board. Processor numbers should be unique on a single backplane.
Not applicable for the busless 8260Ads.
NA
sysLib, sysProcNumGet( )
vxImmrSet( ) - Set the IMMR to a specific value
void vxImmrSet ( UINT32 value )
This routine sets the IMMR to a specific value
N/A
vxImmrGet( ) - return the current IMMR value
UINT32 vxImmrGet (void)
This routine returns the current IMMR value
current IMMR value
sysInputFreqGet( ) - determines the Input Oscillator clock frequency
UINT32 sysInputFreqGet (void)
This routine determines the Input Oscillator clock frequency
From page 9-2 in Rev0 of 8260 book
Input frequency in HZ
sysBaudClkFreq( ) - Obtains frequency of the BRG_CLK in HZ
int sysBaudClkFreq (void)
From page 9-5 in Rev. 0 MPC8260 PowerQUICC II User's Manual
baud clock = 2*cpm_freq/2^2*(DFBRG+1) where DFBRG = 01
= 2*cpm_freq/16
frequency of the BRG_CLK in HZ
sysCpuCheck( ) - confirm the CPU type
void sysCpuCheck (void)
This routine validates the cpu type. If the wrong cpu type is discovered a message is printed using the serial channel in polled mode.
N/A.