VxWorks API Reference : OS Libraries
cacheSh7622Lib - SH7622 cache management library
cacheSh7622LibInit( ) - initialize the SH7622 cache library
This library contains architecture-specific cache library functions for the Hitachi SH7622 instruction and data caches.
cacheLib.h
Writing 1 flushes all the cahe entrie (clears the U,V and LRU
table). Always read 0.
Indicates the cache's operating mode in area P1.
1 = write back mode, 0 = write through mode.
Indicates the cache's operating mode in area P0,U0 and P3.
1 = write through mode, 0 = write back mode.
Cache enabled.
cacheSh7622LibInit( ) - initialize the SH7622 cache library
STATUS cacheSh7622LibInit ( CACHE_MODE instMode, /* instruction cache mode */ CACHE_MODE dataMode /* data cache mode */ )
This routine initializes the cache library for the Hitachi SH7622 processor. It initializes the function pointers and configures the caches to the specified cache modes. Modes should be set before caching is enabled. If two complementary flags are set (enable/disable), no action is taken for any of the input flags. Data cache and istruction cache are mixed together in the SH7622.
Next caching modes are available for the SH7622 processor:
SH7622: CACHE_WRITETHROUGH (cache for instruction and data) CACHE_COPYBACK_P1 (write-back cache for P1)
OK, or ERROR if the specified caching modes were invalid.