VxWorks Reference Manual : Libraries
cacheSun4Lib - Sun-4 cache management library
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
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.
cacheLib.h
cacheSun4LibInit( ) - initialize the Sun-4 cache library
STATUS cacheSun4LibInit ( CACHE_MODE instMode, /* instruction cache mode */ CACHE_MODE dataMode /* data cache mode */ )
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.
OK, or ERROR if cache control is not supported.
cacheSun4ClearLine( ) - clear a line from a Sun-4 cache
STATUS cacheSun4ClearLine ( CACHE_TYPE cache, /* cache to clear */ void * address /* virtual address */ )
This routine flushes and invalidates a specified line from the specified Sun-4 cache.
OK, or ERROR if the cache type is invalid or the cache control is not supported.
cacheSun4ClearPage( ) - clear a page from a Sun-4 cache
STATUS cacheSun4ClearPage ( CACHE_TYPE cache, /* cache to clear */ void * address /* virtual address */ )
This routine flushes and invalidates a specified page from the specified Sun-4 cache.
OK, or ERROR if the cache type is invalid or the cache control is not supported.
cacheSun4ClearSegment( ) - clear a segment from a Sun-4 cache
STATUS cacheSun4ClearSegment ( CACHE_TYPE cache, /* cache to clear */ void * address /* virtual address */ )
This routine flushes and invalidates a specified segment from the specified Sun-4 cache.
OK, or ERROR if the cache type is invalid or the cache control is not supported.
cacheSun4ClearContext( ) - clear a specific context from a Sun-4 cache
STATUS cacheSun4ClearContext ( CACHE_TYPE cache, /* cache to clear */ void * address /* virtual address */ )
This routine flushes and invalidates a specified context from the specified Sun-4 cache.
OK, or ERROR if the cache type is invalid or the cache control is not supported.