sysLib [solaris] - UNIX-target system dependent library
sysModel( ) - return model name of the system CPU
sysBspRev( ) - return the bsp version/revision identification
sysPhysMemTop( ) - get the address of the top of physical memory
sysHwInit( ) - initialize the system hardware
sysMemTop( ) - get the address of the top of VxWorks memory
sysToMonitor( ) - transfer control to the ROM monitor
sysHwInit2( ) - configure and initialize additional system features
sysClkConnect( ) - connect a routine to the system clock interrupt
sysClkDisable( ) - turn off system clock interrupts
sysClkEnable( ) - turn on 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
sysProcNumGet( ) - get processor number
sysProcNumSet( ) - set the processor number
sysIntDisable( ) - disable a bus interrupt level
sysIntEnable( ) - enable a bus interrupt level
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
sysNvRamGet( ) - get 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
This library provides board-specific routines for the VxWorks simulator.
sysLib.h
sysLib, VxWorks Programmer's Guide: Configuration
sysModel( ) - return model name of the system CPU
char *sysModel (void)
Use this routine to find the model name of the system CPU.
A pointer to a string in the form "OS [machine]", where OS represents the operating system name and version number, and machine describes the host hardware.
sysBspRev( ) - return the bsp version/revision identification
char * sysBspRev (void)
This function returns a pointer to a bsp version with the revision. for eg. 1.1/x. BSP_REV is concatanated to BSP_VERSION to form the BSP identification string.
A pointer to the BSP version/revision string.
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 value of LOCAL_MEM_SIZE is zero. If not zero, 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.
For this simulator BSP, the size of memory is kept in the variable sysMemSize and can be changed from the host command line with the -r option. This is unique to the emulator BSPs.
The address of the top of physical memory.
sysHwInit( ) - initialize the system hardware
void sysHwInit (void)
This routine initializes various features of the board. It is normally called from usrInit( ) in usrConfig.c.
This routine should not be called directly by the user.
N/A
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 )
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( ) - configure and initialize additional system features
void sysHwInit2 (void)
This routine connects system interrupts and does any additiona configuration necessary. It is called from usrRoot( ) in usrConfig.c after the multitasking kernel has started.
N/A
sysClkConnect( ) - connect a routine to the system clock interrupt
STATUS sysClkConnect ( FUNCPTR routine, /* routine called at each system clock interrupt */ int arg /* argument with which to call 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( )
sysClkDisable( ) - turn off system clock interrupts
void sysClkDisable (void)
This routine disables system clock interrupts.
N/A
sysLib, sysClkEnable( )
sysClkEnable( ) - turn on system clock interrupts
void sysClkEnable (void)
This routine enables system clock interrupts.
N/A
sysLib, sysClkConnect( ), sysClkDisable( ), sysClkRateSet( )
sysClkRateGet( ) - get the system clock rate
int sysClkRateGet (void)
This routine returns the interrupt rate of the system clock.
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 auxiliary 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.
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( )
sysProcNumGet( ) - get processor number
int sysProcNumGet (void)
This routine returns the processor number for the target, which is set with sysProcNumSet( ).
The processor number for this target.
sysProcNumSet( ) - set the processor number
void sysProcNumSet ( int procNum /* processor number */ )
This routine sets the processor number for the target. Processor numbers should be unique on a host.
The sysProcNumSet( ) routine is important in identifying the processor number when networking with ULIP. The shared memory segment is also initialized here.
N/A
sysLib, sysProcNumGet( )
sysIntDisable( ) - disable a bus interrupt level
STATUS sysIntDisable ( int intLevel /* interrupt level to disable */ )
This routine disables a specified bus interrupt level.
OK, or ERROR if intLevel is not in the range.
sysLib, sysIntEnable( )
sysIntEnable( ) - enable a bus interrupt level
STATUS sysIntEnable ( int intLevel /* interrupt level to enable */ )
This routine enables a specified bus interrupt level.
OK, or ERROR if intLevel is not in the range.
sysLib, sysIntDisable( )
sysBusIntAck( ) - acknowledge a bus interrupt
int sysBusIntAck ( int intLevel /* interrupt level to acknowledge */ )
This routine acknowledges a specified bus interrupt.
This routine has no effect.
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 an bus interrupt for a specified level with a specified vector.
OK or ERROR.
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, since there is no mailbox facility.
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, since there is no mailbox facility.
sysBusTas( ) - test and set a location across the bus
BOOL sysBusTas ( char * adrs /* address to be tested and set */ )
This routine performs a test-and-set instruction.
This routine is similar to vxTas( ).
TRUE if the previous value had been zero, or FALSE if the value was set already.
sysNvRamGet( ) - get 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 will be terminated with an EOS.
OK, or ERROR if access is outside the non-volatile RAM range.
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.
OK, or ERROR if access is outside the non-volatile RAM range.
sysLib, sysNvRamGet( )
sysLocalToBusAdrs( ) - convert a local address to a bus address
STATUS sysLocalToBusAdrs ( int adrsSpace, /* bus address space in which busAdrs resides */ char * localAdrs, /* local address to convert */ char * *pBusAdrs /* where to return bus address */ )
This routine gets the bus address that accesses a specified local memory address.
This routine just returns the same address. For the simulator BSPs we can only simulate a VME bus. The input address is assumed to be the same for the local cpu and the simulated VME bus.
OK, or ERROR if the address space is unknown or the mapping is not possible.
sysBusToLocalAdrs( ) - convert a bus address to a local address
STATUS sysBusToLocalAdrs ( int adrsSpace, /* bus address space in which busAdrs resides */ char * busAdrs, /* bus address to convert */ char * *pLocalAdrs /* where to return local address */ )
This routine gets the local address that accesses a specified bus address.
This routine just returns the same address. For the simulator BSPs we can only simulate a VME bus. The input address is assumed to be a local cpu address, not a real VME address.
OK, or ERROR if the address space is unknown or the mapping is not possible.