Share via


CacheRangeFlush (Windows Embedded CE 6.0)

1/6/2010

This function is called by device drivers and applications to flush a specified range of the cache.

Syntax

void CacheRangeFlush(
  LPVOID pAddr,
  DWORD dwLength,
  DWORD dwFlags
);

Parameters

  • pAddr
    [in] Starting virtual address where the cache operation is to be performed in. The cache operation is specified by the value in dwFlags.
  • dwLength
    [in] Specifies the length, in bytes.
  • dwFlags
    [in] Specifies the operation to be performed. The following table shows possible values.

    Value Description

    CACHE_SYNC_ALL

    Perform all of the above operations.

    CACHE_SYNC_DISCARD

    Write back and discard cached data.

    CACHE_SYNC_FLUSH_D_TLB

    Flush the data TLB.

    CACHE_SYNC_FLUSH_I_TLB

    Flush the instruction translation look-aside buffer (TLB).

    CACHE_SYNC_FLUSH_TLB

    Flush both the instruction TLB and the data TLB.

    CACHE_SYNC_INSTRUCTIONS

    Discard all cached instructions.

    CACHE_SYNC_L2_DISCARD

    Write back and discard the L2 cache.

    CACHE_SYNC_L2_WRITEBACK

    Write back the L2 cache.

    CACHE_SYNC_WRITEBACK

    Write back cached data.

Return Value

None.

Remarks

If pAddr and dwLength are set to zero, this applies to all addresses. For example, the call CacheRangeFlush(0, 0, CACHE_SYNC_FLUSH_TLB) flushes the data in the TLB. CacheRangeFlush(0, 0, CACHE_SYNC_DISCARD) writes back and discards everything in the data cache.

Requirements

Header pkfuncs.h
Library OEMMain.lib or OEMMain_StaticKITL.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Kernel Functions

Other Resources

OEMCacheRangeFlush