User`s guide
VxWorks
BSP Developer’s Guide, 6.0
76
For L2 cache support, the following routines must be supplied and added to
sysCache.c:
For cache lock support, the following routines must be supplied and added to
sysCacheLockLib.c:
The following code illustrates one possible set of routine prototypes. Because these
routines are never called by the core VxWorks routines, the BSP developer has
some discretion in their design.
STATUS sysL2CacheInit (void);
void sysL2CacheEnable (void);
void sysL2CacheDisable (void);
void sysL2CacheFlush (void);
void sysL2CacheInvFunc (void);
STATUS sysCacheLock
(
CACHE_TYPE cacheType,
void * adrs,
UINT32 bytes
);
STATUS sysCacheUnlock
(
CACHE_TYPE cacheType
);
STATUS sysL2CacheLock
(
CACHE_TYPE cacheType,
void * adrs,
size_t bytes
);
STATUS sysL2CacheUnlock (void);
sysL2CacheInit( ) initialize L2 cache library
sysL2CacheEnable( ) enable L2 cache
sysL2CacheDisable( ) disable L2 cache
sysL2CacheFlush( ) flush L2 cache
sysL2CacheInvFunc( ) invalidate L2 cache
sysCacheLock( ) lock the specified data/instruction region
sysCacheUnlock( ) unlock the previously locked cache
sysL2CacheLock( ) lock L2 cache
sysL2CacheUnlock( ) unlock L2 cache