DCFlushRange

C Specification

#include <revolution/os.h>

void DCFlushRange(void* startAddr, u32 nBytes);

Arguments

startAddr Effective address (not the physical address) .
nBytes Size of range to flush.

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 is rounded down to a 32-byte boundary. The end address (i.e., startAddr + nBytes) is rounded up to a 32-byte boundary.

This command will still execute even if the cache is disabled or frozen by the DCFreeze function.

This function invokes a sync after flushing the specified range. This means that this function will stall until the CPU knows 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. DMA transfers with locked caches are not affected by the PPCSync function.

See Also

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

Revision History

03/01/2006 Initial version.