VxWorks Reference Manual : Libraries

cacheSun4Lib

NAME

cacheSun4Lib - Sun-4 cache management library

ROUTINES

cacheSun4LibInit( ) - initialize the Sun-4 cache library
cacheSun4ClearLine( ) - clear a line from a Sun-4 cache
cacheSun4ClearPage( ) - clear a page from a Sun-4 cache
cacheSun4ClearSegment( ) - clear a segment from a Sun-4 cache
cacheSun4ClearContext( ) - clear a specific context from a Sun-4 cache

DESCRIPTION

This library contains architecture-specific cache library functions for the Sun Microsystems Sun-4 architecture. There is a 64-Kbyte mixed instruction and data cache that operates in write-through mode. Each cache line contains 16 bytes. Cache tags may be "flushed" by accesses to alternate space in supervisor mode. Invalidate operations are performed in software by writing zero to the cache tags in an iterative manner. Tag operations are performed on "page," "segment," or "context" granularity.

MMU (Memory Management Unit) support is needed to mark pages cacheable or non-cacheable. For more information, see the manual entry for vmLib.

For general information about caching, see the manual entry for cacheLib.

INCLUDE FILES

cacheLib.h

SEE ALSO

cacheSun4Lib, cacheLib, vmLib


Libraries : Routines

cacheSun4LibInit( )

NAME

cacheSun4LibInit( ) - initialize the Sun-4 cache library

SYNOPSIS

STATUS cacheSun4LibInit
    (
    CACHE_MODE instMode, /* instruction cache mode */
    CACHE_MODE dataMode  /* data cache mode */
    )

DESCRIPTION

This routine initializes the function pointers for the Sun Microsystems Sun-4 cache library. The board support package can select this cache library by assigning the function pointer sysCacheLibInit to cacheSun4LibInit( ).

The only available mode for the Sun-4 cache is CACHE_WRITETHROUGH.

RETURNS

OK, or ERROR if cache control is not supported.

SEE ALSO

cacheSun4Lib


Libraries : Routines

cacheSun4ClearLine( )

NAME

cacheSun4ClearLine( ) - clear a line from a Sun-4 cache

SYNOPSIS

STATUS cacheSun4ClearLine
    (
    CACHE_TYPE cache,  /* cache to clear */
    void *     address /* virtual address */
    )

DESCRIPTION

This routine flushes and invalidates a specified line from the specified Sun-4 cache.

RETURNS

OK, or ERROR if the cache type is invalid or the cache control is not supported.

SEE ALSO

cacheSun4Lib


Libraries : Routines

cacheSun4ClearPage( )

NAME

cacheSun4ClearPage( ) - clear a page from a Sun-4 cache

SYNOPSIS

STATUS cacheSun4ClearPage
    (
    CACHE_TYPE cache,  /* cache to clear */
    void *     address /* virtual address */
    )

DESCRIPTION

This routine flushes and invalidates a specified page from the specified Sun-4 cache.

RETURNS

OK, or ERROR if the cache type is invalid or the cache control is not supported.

SEE ALSO

cacheSun4Lib


Libraries : Routines

cacheSun4ClearSegment( )

NAME

cacheSun4ClearSegment( ) - clear a segment from a Sun-4 cache

SYNOPSIS

STATUS cacheSun4ClearSegment
    (
    CACHE_TYPE cache,  /* cache to clear */
    void *     address /* virtual address */
    )

DESCRIPTION

This routine flushes and invalidates a specified segment from the specified Sun-4 cache.

RETURNS

OK, or ERROR if the cache type is invalid or the cache control is not supported.

SEE ALSO

cacheSun4Lib


Libraries : Routines

cacheSun4ClearContext( )

NAME

cacheSun4ClearContext( ) - clear a specific context from a Sun-4 cache

SYNOPSIS

STATUS cacheSun4ClearContext
    (
    CACHE_TYPE cache,  /* cache to clear */
    void *     address /* virtual address */
    )

DESCRIPTION

This routine flushes and invalidates a specified context from the specified Sun-4 cache.

RETURNS

OK, or ERROR if the cache type is invalid or the cache control is not supported.

SEE ALSO

cacheSun4Lib