VxWorks BSP Reference : wrMdpBasic8xx
sysLib [wrMdpBasic8xx] - system-dependent library
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
ppc860DevInit( ) - initialize the SMC
ppc860Int( ) - 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
ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series
sysClkConnect( ) - connect a routine to the system clock interrupt
sysClkEnable( ) - turn on system clock interrupts
sysClkDisable( ) - turn off system clock interrupts
sysClkRateGet( ) - get the system clock rate
sysClkRateSet( ) - set the system clock rate
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
sysEnetAddrGet( ) - gets the 6 byte ethernet address
sysEnetAddrSet( ) - sets the 6 byte ethernet address
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
sysCpmEnetIntEnable( ) - enable the Ethernet interface interrupt
sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
sysFlashGet( ) - get the contents of flash memory
sysFlashSet( ) - write to flash memory
sysFlashSectorErase( ) - erase the specified flash sector
sysFlashDelay( ) - create a delay for a specified number of microseconds
sysFlashDataPoll( ) - wait for a flash device operation to complete
sysFlashErase( ) - erase the contents of flash memory
sysFlashWrite( ) - write data to flash memory
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
sysCpuType( ) - determines the 8xx CPU type
sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu frequency
sysCpuSpeed( ) - determines operating frequence via PLPRCR Register
This library provides board-specific routines. The chip drivers included are:
ppcDecTimer.c - system clock and timestamp driver using PPC decrementer
ppc860Timer.c - PowerPC/860 Timer library
ppc860Intr.c - PowerPC/860 Interrupt Controller driver
ppc860Sio.c - PowerPC/860 Serial driver
flash29NvRam.c - Flash access routines
sysSerial.c - prepares serial driver evbNs16550sio
sysNet.c - prepares PCI Ethernet driver ln97xEnd
sysMotCpmEnd.c - configuration module for the motCpmEnd driver
sysLib.h
VxWorks Programmer's Guide: Configuration
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.
ppc860DevInit( ) - initialize the SMC
void ppc860DevInit ( PPC860SMC_CHAN * pChan )
This routine is called to initialize the chip to a quiescent state. Note that the smcNum field of PPC860SMC_CHAN must be either 1 or 2.
ppc860Int( ) - handle an SMC interrupt
void ppc860Int ( PPC860SMC_CHAN * pChan )
This routine is called to handle SMC interrupts.
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.
Data Parameter Ram layout:
-----------------------------
| | DPRAM base
| |
| |
| |
|---------------------------|
| 8 bytes per descriptor | Tx Buffer Descriptor (0x2200)
|---------------------------|
| |
|---------------------------|
| 16 descriptors @ | Rx Buffer Descriptors (0x2210)
| 8 bytes per descriptor |
| |
|---------------------------|
| | end Rx BDs (0x2290)
| |
| |
|---------------------------|
| 80 bytes allowed | Tx Buffer (0x2300 + DPRAM base )
|---------------------------|
| one receive char/buffer | Rx Buffer (0x2380 + DPRAM base )
|---------------------------|
| |
| |
| |
| |
|---------------------------|
| 34 bytes of parameter info| SMC1 Parameter Area (0x1e80)
| including Rx and Tx BD |
| pointers, func codes |
| etc... |
|---------------------------|
| |
| |
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
ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series
STATUS ppc860IntrInit ( VOIDFUNCPTR * cpmIntrVec /* Intr level of the CPM Intr ctrl */ )
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.
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.
OK or ERROR if the SUI interrupt level to connect the CPM interrupt contoller is wrong.
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.
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.
Because the PowerPC decrementer clock serves as the timestamp timer, the decrementer clock frequency is also the timestamp timer frequency.
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( )
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( )
sysEnetAddrGet( ) - gets the 6 byte ethernet address
STATUS sysEnetAddrGet ( int unit, /* not used - only slave SCC1 is wired to port */ UINT8 * addr /* LOcation address is returned in */ )
This routine gets the 6 byte ethernet address used by the ethernet device.
OK
sysLib, sysEnetAddrSet( )
sysEnetAddrSet( ) - sets the 6 byte ethernet address
void sysEnetAddrSet ( UCHAR byte5, UCHAR byte4, UCHAR byte3, UCHAR byte2, UCHAR byte1, UCHAR byte0 )
This routine sets the 6 byte ethernet address used by the ethernet device.
OK
sysLib, sysEnetAddrGet( )
sysMotCpmEndLoad( ) - load an istance of the motCpmEnd driver
END_OBJ * sysMotCpmEndLoad ( char * pParamStr, /* ptr to initialization parameter string */ void * unused /* unused optional argument */ )
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.
pointer to END object or NULL.
sysLib, motCpmEndLoad ()
sysCpmEnetDisable( ) - disable the Ethernet controller
void sysCpmEnetDisable ( int unit /* not used - only slave SCC1 is wired to port */ )
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.
N/A
sysCpmEnetEnable( ) - enable the Ethernet controller
STATUS sysCpmEnetEnable ( int unit /* not used - only slave SCC1 is wired to port */ )
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.
OK, or ERROR if the Ethernet controller cannot be enabled.
sysCpmEnetAddrGet( ) - get the hardware Ethernet address
STATUS sysCpmEnetAddrGet ( int unit, /* not used - only slave SCC1 is wired to port */ UINT8 * addr /* LOcation address is returned in */ )
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.
OK, or ERROR if the Ethernet address cannot be returned.
sysCpmEnetCommand( ) - issue a command code to the ethernet controller.
STATUS sysCpmEnetCommand ( int unit, /* not used - only slave SCC1 is wired to port */ UINT16 command /* Command to be issued */ )
This routine issue a command code to the ethernet controller.
OK
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
void sysCpmEnetIntDisable ( int unit /* not used - only slave SCC1 is wired to port */ )
This routine disable the interrupt for the Ethernet interface specified by unit.
N/A.
sysCpmEnetIntEnable( ) - enable the Ethernet interface interrupt
void sysCpmEnetIntEnable ( int unit /* not used - only slave SCC1 is wired to port */ )
This routine enable the interrupt for the Ethernet interface specified by unit.
N/A.
sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt
void sysCpmEnetIntClear ( int unit /* not used - only slave SCC1 is wired to port */ )
This routine clears the interrupt for the Ethernet interface specified by unit.
N/A.
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 calls sysFlashGet( ) to copy the contents of flash memory into a specified string. The string is terminated with an EOS.
This routine uses flash memory, since there is no NVRAM on the IBM 403 EVB.
The return value of sysFlashGet( ).
sysLib, sysNvRamSet( ), sysFlashGet( )
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 calls sysFlashSet( ) to copy a specified string into flash memory.
This routine uses flash memory, since there is no NVRAM on the IBM 403 EVB.
The return value of sysFlashSet( ).
sysLib, sysNvRamGet( ), sysFlashSet( )
sysFlashGet( ) - get the contents of flash memory
STATUS sysFlashGet ( char * string, /* where to copy flash memory */ int strLen, /* maximum number of bytes to copy */ int offset /* byte offset into flash memory */ )
This routine copies the contents of flash memory into a specified string. The string is terminated with an EOS.
OK, or ERROR if access is outside the flash memory range.
sysLib, sysFlashSet( )
If multiple tasks are calling sysFlashSet( ) and sysFlashGet( ),
they should use a semaphore to ensure mutually exclusive access.
sysFlashSet( ) - write to flash memory
STATUS sysFlashSet ( char * string, /* string to be copied into flash memory */ int strLen, /* maximum number of bytes to copy */ int offset /* byte offset into flash memory */ )
This routine copies a specified string into flash memory after calling sysFlashSectorErase( ) and clearing flash memory.
If the specified string must be overlaid on the contents of flash memory, undefine FLASH_NO_OVERLAY.
OK, or ERROR if the write fails or the input parameters are
out of range.
sysLib, sysFlashSectorErase( ), sysFlashGet( ), sysFlashWrite( )
sysFlashSectorErase( ) - erase the specified flash sector
STATUS sysFlashSectorErase ( UINT8 flashType, /* type of flash memory on-board */ UINT8 sectorNum /* Sector number (1-->n) */ )
Flash 29Fxxx devices are erased by writing the six-byte erase code into specific address locations, which sets all byte locations to a high value (0xFF).
Only works for first sector.
OK, or ERROR if the contents of flash memory cannot be erased.
sysFlashDelay( ) - create a delay for a specified number of microseconds
void sysFlashDelay ( int delayCount /* number of uSec to delay */ )
This routine implements a busy wait for a specified number of microseconds. The timing loop can be adjusted on a board-dependent basis by defining values for the following macros:
The values SYS_FLASH_DELAY_SHIFT and SYS_FLASH_DELAY_ADJ convert microseconds into a board-dependent tick-count. This routine can call a user-defined hook, sysFlashBoardDelay( ), which creates a delay for a number of board-dependent ticks as specified by SYS_FLASH_DELAY_INCR. To use sysFlashBoardDelay( ), define SYS_FLASH_BOARD_DELAY in config.h.
- SYS_FLASH_DELAY_SHIFT
- SYS_FLASH_DELAY_ADJ
- SYS_FLASH_DELAY_INCR
N/A
sysLib, sysFlashErase( ), sysFlashWrite( )
sysFlashDataPoll( ) - wait for a flash device operation to complete
STATUS sysFlashDataPoll ( volatile UINT16 * pFA, /* programmed address to poll */ UINT16 value /* data programmed to poll address */ )
This routine polls a specified address on a 29Fxxx flash device until the device operation at that location completes or times out.
While a flash operation is in progress, a read on the device returns on Q7 (data bit 7) the complement of the previous value of Q7. Once the flash operation has completed, the Q7 bit returns the true data of the last write. Subsequent reads return the correct data in Q0-7.
The Q5 bit implements a timeout functionality. When a currently executing flash operation exceeds specified limits, the Q5 bit is set (to 1).
OK, or ERROR if the timeout (!Q5) occurs before the device operation completes.
sysLib, sysFlashErase( ), sysFlashWrite( )
sysFlashErase( ) - erase the contents of flash memory
STATUS sysFlashErase ( UINT8 flashType /* type of flash memory on-board */ )
This routine clears the entire contents of flash memory (chip erase).
Flash 29Fxxx devices are erased by writing the six-byte erase code into specific address locations, which sets all byte locations to a high value (0xFF).
OK, or ERROR if the contents of flash memory cannot be erased.
sysFlashWrite( ) - write data to flash memory
STATUS sysFlashWrite ( UINT16 * pFB, /* string to be copied; use value if NULL */ int size, /* size to program in bytes */ int offset, /* byte offset into flash memory */ UINT8 flashType, /* type of flash memory on-board */ UINT16 value /* value to program */ )
This routine copies specified data of a specified length, size, into a specified offset, offset, in the flash memory. Data is passed as a string, pFB, if not NULL. If NULL, data is taken as a repeated sequence of value. The parameter flashType should be set to the flash device code.
Flash 29Fxxx devices are programmed by a sequence of operations:
- set up device to write
- perform write
- wait for the write to complete
OK, or ERROR if the write operation fails.
sysLib, sysFlashSet( )
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 and revision number
char * sysBspRev (void)
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.
A pointer to the BSP version/revision string.
sysHwInit( ) - initialize the system hardware
void sysHwInit (void)
This routine initializes various feature of the MDPBASIC8XX board. It sets up the control registers, initializes various devices if they are present.
This routine should not be called directly by the user.
N/A
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.
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.
Do no adjust LOCAL_MEM_SIZE to reserve memory for application use. See sysMemTop( ) for more information on reserving 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 by 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( ) - initialize additional system hardware
void sysHwInit2 (void)
This routine connects system interrupt vectors and configures any required features not configured by sysHwInit( ).
N/A
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. It also maps local resources onto the VMEbus.
N/A
sysLib, sysProcNumGet( )
sysCpuType( ) - determines the 8xx CPU type
int sysCpuType (void)
This routine determines the 8xx CPU type
CPU type
sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu frequency
void sysClkRateAdjust ( int * pDecClkFrequency )
This routine calculates proper decrementer frequency for a cpu frequency
N/A
sysCpuSpeed( ) - determines operating frequence via PLPRCR Register
UINT32 sysCpuSpeed (void)
This routine determines operating frequence via PLPRCR Register
CPU speed in Hz