Share via


Cache (OAL) (Compact 7)

3/12/2014

Windows Embedded Compact 7 stores data in a cache to serve data requests by the kernel and applications more quickly. The header file that defines the OAL cache module interface is 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 of cache code locations:

  • Platform\Common\Src\Common\Cache
  • Platform\Common\Src\SOC\<SOC Name>\OAL\Cache
  • Platform\Common\Src\<CPU Family>\Common\Cache
  • Platform\Common\Src\<CPU Family>\<CPU Name>\Cache

The following table lists the main cache functions; for more information, see Cache Reference. The common cache code that comes 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. For example, there is cache-flushing code in Platform\Common\Src\ARM\ARM926\Cache\flush.c that is suitable for ARM CPUs with separate data and instruction caches.

Purpose Function name Typical file name

Initializes the cache

OALCacheGlobalsInit

init.s, initcache.s, init.c

Gets cache information

OALIoCtlHalGetCacheInfo (OEMIoControl)

ioctl.c

Cleans the cache

OEMCacheRangeFlush, OALCleanDCache, OALCleanDCacheLines

flush.c, cleandc.s, cleandclines.s

Clears the translation look-aside buffers (TLB)

OALClearDTLB, OALClearITLB

cleardtlb.s, clearitlb.s

Flushes the cache

OALFlushDCache, OALFlushDCacheLines, OALFlushICache, OALFlushICacheLines

flushdc.s, flushdclines.s, flushic.s, flushiclines.s

See Also

Concepts

OAL Code Overview