DCFlushRange

Syntax

#include <revolution/os.h>

void DCFlushRange(void* startAddr, u32 nBytes);

Arguments

startAddr Effective address (not the physical address) .
nBytes Size of region to be flushed.

Return Values

None.

Description

Flushes a specified range. The cache data block hit in the data cache for the specified range is flushed to main memory and invalidated. The startAddr argument will be rounded down to the closest 32-byte boundary, while the end address (startAddr + nBytes) will be rounded up to the closest 32-byte boundary.

Be aware that even if the cache is disabled or frozen (via the DCFreeze function), this command will still execute.

This function invokes a sync after flushing the specified range. This means that this function will stall until the CPU detects that the data has been written to main memory. Because this operation can be costly, consider calling the DCFlushRangeNoSync function on several ranges followed by a separate call to the PPCSync function. Be aware that DMA transfers into and out of the locked cache are not affected by the PPCSync function.

See Also

Cache Functions, DCFlushRangeNoSync, DCInvalidateRange, DCStoreRange, DCStoreRangeNoSync, ICInvalidateRange, PPCSync

Revision History

2006/03/01 Initial version.


CONFIDENTIAL