Cache (OAL) (Compact 2013)
3/26/2014
Compact 2013 is designed to make optimum use of hardware caches to enable high performance. Hardware caches are often arranged in levels, such as small-size-but-fast level 1 caches and larger-but-slower level 2 caches. The OAL cache code is responsible for initializing and managing all these cache. The header file that defines the OAL cache module interface is %_WINCEROOT%\Platform\Common\Src\Inc\oal_cache.h. The cache functions are linked into oal.lib.
The cache code is often divided into multiple files, some of which are in assembly language. The following are typical cache code locations:
- %_WINCEROOT%\Platform\Common\Src\Common\Cache
- %_WINCEROOT%\Platform\Common\Src\SOC\<SOC Name>\OAL\Cache
- %_WINCEROOT%\Platform\Common\Src\<CPU Family>\Common\Cache
- %_WINCEROOT%\Platform\Common\Src\<CPU Family>\<CPU Name>\Cache
The following table lists the main cache functions; however, for more information about cache functions, see Cache Reference. The common cache code that is provided with Windows Embedded Compact contains CPU-family-specific implementations that you may be able to use with little modification if your hardware platform uses a CPU from the same family.
Purpose |
Function name |
---|---|
Initializes the cache. |
|
Gets cache information. |
|
Cleans, flushes, or discards cache lines as requested. The primary routine called by the kernel to perform all cache operations is OEMCacheRangeFlush. |
|
Clears the translation look-aside buffers (TLB). |
|
Flushes the cache. |
OALFlushDCache, OALFlushDCacheLines, OALFlushICache, OALFlushICacheLines |