BSP Reference : solaris

sysLib [solaris]

NAME

sysLib [solaris] - UNIX-target system dependent library

ROUTINES

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

DESCRIPTION

This library provides board-specific routines for the VxWorks simulator.

INCLUDE FILES

sysLib.h

SEE ALSO

sysLib, VxWorks Programmer's Guide: Configuration


solaris : Routines

sysModel( )

NAME

sysModel( ) - return model name of the system CPU

SYNOPSIS


char *sysModel (void)

DESCRIPTION

Use this routine to find the model name of the system CPU.

RETURNS

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.

SEE ALSO

sysLib


solaris : Routines

sysBspRev( )

NAME

sysBspRev( ) - return the bsp version/revision identification

SYNOPSIS


char * sysBspRev (void)

DESCRIPTION

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.

RETURNS

A pointer to the BSP version/revision string.

SEE ALSO

sysLib


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

NOTE

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.

RETURNS

The address of the top of physical memory.

SEE ALSO

sysLib, sysMemTop( )


solaris : Routines

sysHwInit( )

NAME

sysHwInit( ) - initialize the system hardware

SYNOPSIS


void sysHwInit (void)

DESCRIPTION

This routine initializes various features of the board. It is normally called from usrInit( ) in usrConfig.c.

NOTE

This routine should not be called directly by the user.

RETURNS

N/A

SEE ALSO

sysLib


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


solaris : Routines

sysToMonitor( )

NAME

sysToMonitor( ) - transfer control to the ROM monitor

SYNOPSIS

STATUS sysToMonitor
    (
    int startType
    )

DESCRIPTION

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.

RETURNS

Does not return.

SEE ALSO

sysLib


solaris : Routines

sysHwInit2( )

NAME

sysHwInit2( ) - configure and initialize additional system features

SYNOPSIS


void sysHwInit2 (void)

DESCRIPTION

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.

RETURNS

N/A

SEE ALSO

sysLib


solaris : Routines

sysClkConnect( )

NAME

sysClkConnect( ) - connect a routine to the system clock interrupt

SYNOPSIS

STATUS sysClkConnect
    (
    FUNCPTR routine, /* routine called at each system clock interrupt */
    int     arg      /* argument with which to call 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.

RETURN

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

SEE ALSO

sysLib, intConnect( ), usrClock( ), sysClkEnable( )


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


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


solaris : Routines

sysClkRateGet( )

NAME

sysClkRateGet( ) - get the system clock rate

SYNOPSIS


int sysClkRateGet (void)

DESCRIPTION

This routine returns the interrupt rate of the system clock.

RETURNS

The number of ticks per second of the system clock.

SEE ALSO

sysLib, sysClkEnable( ), sysClkRateSet( )


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


solaris : Routines

sysAuxClkConnect( )

NAME

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

SYNOPSIS

STATUS sysAuxClkConnect
    (
    FUNCPTR routine, /* routine called at each auxiliary 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( )


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


solaris : Routines

sysAuxClkEnable( )

NAME

sysAuxClkEnable( ) - turn on auxiliary clock interrupts

SYNOPSIS


void sysAuxClkEnable (void)

DESCRIPTION

This routine enables auxiliary clock interrupts.

RETURNS

N/A

SEE ALSO

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


solaris : 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, sysAuxClkRateSet( )


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


solaris : Routines

sysProcNumGet( )

NAME

sysProcNumGet( ) - get processor number

SYNOPSIS


int sysProcNumGet (void)

DESCRIPTION

This routine returns the processor number for the target, which is set with sysProcNumSet( ).

RETURNS

The processor number for this target.

SEE ALSO

sysLib


solaris : Routines

sysProcNumSet( )

NAME

sysProcNumSet( ) - set the processor number

SYNOPSIS

void sysProcNumSet
    (
    int procNum /* processor number */
    )

DESCRIPTION

This routine sets the processor number for the target. Processor numbers should be unique on a host.

NOTE

The sysProcNumSet( ) routine is important in identifying the processor number when networking with ULIP. The shared memory segment is also initialized here.

RETURNS

N/A

SEE ALSO

sysLib, sysProcNumGet( )


solaris : Routines

sysIntDisable( )

NAME

sysIntDisable( ) - disable a bus interrupt level

SYNOPSIS

STATUS sysIntDisable
    (
    int intLevel /* interrupt level to disable */
    )

DESCRIPTION

This routine disables a specified bus interrupt level.

RETURNS

OK, or ERROR if intLevel is not in the range.

SEE ALSO

sysLib, sysIntEnable( )


solaris : Routines

sysIntEnable( )

NAME

sysIntEnable( ) - enable a bus interrupt level

SYNOPSIS

STATUS sysIntEnable
    (
    int intLevel /* interrupt level to enable */
    )

DESCRIPTION

This routine enables a specified bus interrupt level.

RETURNS

OK, or ERROR if intLevel is not in the range.

SEE ALSO

sysLib, sysIntDisable( )


solaris : Routines

sysBusIntAck( )

NAME

sysBusIntAck( ) - acknowledge a bus interrupt

SYNOPSIS

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

DESCRIPTION

This routine acknowledges a specified bus interrupt.

NOTE

This routine has no effect.

RETURNS

NULL

SEE ALSO

sysLib


solaris : 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 an bus interrupt for a specified level with a specified vector.

RETURNS

OK or ERROR.

SEE ALSO

sysLib


solaris : 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, since there is no mailbox facility.

SEE ALSO

sysLib, sysMailboxEnable( )


solaris : 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, since there is no mailbox facility.

SEE ALSO

sysLib, sysMailboxConnect( )


solaris : Routines

sysBusTas( )

NAME

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

SYNOPSIS

BOOL sysBusTas
    (
    char * adrs /* address to be tested and set */
    )

DESCRIPTION

This routine performs a test-and-set instruction.

NOTE

This routine is similar to vxTas( ).

RETURNS

TRUE if the previous value had been zero, or FALSE if the value was set already.

SEE ALSO

sysLib, vxTas( )


solaris : Routines

sysNvRamGet( )

NAME

sysNvRamGet( ) - get 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 will be terminated with an EOS.

RETURNS

OK, or ERROR if access is outside the non-volatile RAM range.

SEE ALSO

sysLib, sysNvRamSet( )


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


solaris : Routines

sysLocalToBusAdrs( )

NAME

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

SYNOPSIS

STATUS sysLocalToBusAdrs
    (
    int    adrsSpace, /* bus address space in which busAdrs resides */
    char * localAdrs, /* local address to convert */
    char * *pBusAdrs  /* where to return bus address */
    )

DESCRIPTION

This routine gets the bus address that accesses a specified local memory address.

NOTE

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.

RETURNS

OK, or ERROR if the address space is unknown or the mapping is not possible.

SEE ALSO

sysLib, sysBusToLocalAdrs( )


solaris : Routines

sysBusToLocalAdrs( )

NAME

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

SYNOPSIS

STATUS sysBusToLocalAdrs
    (
    int    adrsSpace,  /* bus address space in which busAdrs resides */
    char * busAdrs,    /* bus address to convert */
    char * *pLocalAdrs /* where to return local address */
    )

DESCRIPTION

This routine gets the local address that accesses a specified bus address.

NOTE

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.

RETURNS

OK, or ERROR if the address space is unknown or the mapping is not possible.

SEE ALSO

sysLib, sysLocalToBusAdrs( )