KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
cache.h File Reference

Cache management functionality. More...

#include <sys/cdefs.h>
#include <arch/types.h>

Go to the source code of this file.

Functions

void icache_flush_range (uint32 start, uint32 count)
 Flush the instruction cache. More...
 
void dcache_inval_range (uint32 start, uint32 count)
 Invalidate the data/operand cache. More...
 
void dcache_flush_range (uint32 start, uint32 count)
 Flush the data/operand cache. More...
 

Detailed Description

Cache management functionality.

This file contains definitions for functions that manage the cache in the Dreamcast, including functions to flush and invalidate the caches.

Author
Dan Potter

Function Documentation

void dcache_flush_range ( uint32  start,
uint32  count 
)

Flush the data/operand cache.

This function flushes a range of the data/operand cache, forcing a write- back on all of the data in the specified range. This does not invalidate the cache in the process (meaning the blocks will still be in the cache, just not marked as dirty after this has completed). If you wish to invalidate the cache as well, call dcache_inval_range() after calling this function.

Parameters
startThe physical address to begin flushing at.
countThe number of bytes to flush.
void dcache_inval_range ( uint32  start,
uint32  count 
)

Invalidate the data/operand cache.

This function invalidates a range of the data/operand cache. If you care about the contents of the cache that have not been written back yet, use dcache_flush_range() before using this function.

Parameters
startThe physical address to begin invalidating at.
countThe number of bytes to invalidate.
void icache_flush_range ( uint32  start,
uint32  count 
)

Flush the instruction cache.

This function flushes a range of the instruction cache.

Parameters
startThe physical address to begin flushing at.
countThe number of bytes to flush.