CARD_SetCacheFlushFlag

Syntax

#include <nitro/card.h>

void CARD_SetCacheFlushFlag(BOOL icache, BOOL dcache);

Arguments

icache TRUE to enable auto-invalidation of instruction cache.
dcache TRUE to enable auto-invalidation of data cache.

Return Values

None.

Description

Configures whether the invalidation process to flush the cache takes place automatically when a process to load ROM data occurs inside the library.

When ROM data is loaded into memory, if the instruction cache is always invalidated for DMA transfers, the safest cache operation is to invalidate the data cache as well. However, if it is clear that the cache does not need to be considered, performing these operations becomes redundant. This function allows you to enable and disable the cache-invalidation process.

When the CARD library loads ROM data into memory, it automatically handles the cache according to the settings configured here.
The default settings are icache = FALSE and dcache = TRUE. With these settings, the data cache is invalidated, but the instruction cache is not.
Unless you have a special reason, you do not need to change the default settings.

Because the instruction cache is controlled the same way even in cases where higher-level libraries such as the FS library and the EL library control the execution code, there is no need to worry about data loads by the CARD library.

As for the data cache, the default setting of TRUE should not be changed except in extreme situations because it would have a far-reaching impact on all of the higher-level libraries that handle VRAM, DMA, ARM7, and other external memory devices.

See Also

CARD_GetCacheFlushFlag

Revision History

2008/12/05 Initial version.


CONFIDENTIAL