Share via


Cache Flush Routines (Windows Embedded CE 6.0)

1/5/2010

Instruction and data caches are flushed based on the CPU architecture and the kernel.

Data Cache Flush

The data cache flush function OEMCacheRangeFlush is called to flush the data cache by determining how many cache lines are available and then flushing each line until all lines have been flushed.

Note

The old data cache flush function, FlushDCache, is deprecated and should never be used.

OEMCacheRangeFlush is called in the following cases:

  • CacheSync is called. This is a public API that anyone can call.
  • When the kernel loads DLLs or executable files.
  • Whenever the kernel debugger is active.

Instruction Cache Flush

The instruction cache flush function OEMCacheRangeFlush is called at various times to flush the instruction cache by determining how many cache lines are available and then flushing each line until all lines have been flushed.

Note

The old instruction cache flush function, FlushICache, is deprecated and should never be used.

OEMCacheRangeFlush is called in the following cases:

  • CacheSync is called with flags CACHE_SYNC_INSTRUCTIONS or CACHE_SYNC_DISCARD. This is a public API that anyone can call.

  • When DLLs or executable files are loaded or paged in by the kernel.

  • Whenever the kernel debugger is performing actively.

    Note

    On x86-based hardware platforms, you can optimize the OEMFlushCache function.

See Also

Concepts

OEMCacheRangeFlush Function Implementation