KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
cache.h File Reference

Cache management functionality. More...

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

Go to the source code of this file.

Macros

#define CPU_CACHE_BLOCK_SIZE   32
 SH4 cache block size.
 
#define dcache_wback_sq(ptr)
 Write-back Store Queue buffer to external memory.
 

Functions

void icache_flush_range (uintptr_t start, size_t count)
 Flush the instruction cache.
 
void dcache_inval_range (uintptr_t start, size_t count)
 Invalidate the data/operand cache.
 
void dcache_flush_range (uintptr_t start, size_t count)
 Flush the data/operand cache.
 
void dcache_flush_all (void)
 Flush all the data/operand cache.
 
void dcache_purge_range (uintptr_t start, size_t count)
 Purge the data/operand cache.
 
void dcache_purge_all (void)
 Purge all the data/operand cache.
 
void dcache_purge_all_with_buffer (uintptr_t start, size_t count)
 Purge all the data/operand cache with buffer.
 
static __always_inline void dcache_pref_block (const void *src)
 Prefetch one block to the data/operand cache.
 
static __always_inline void dcache_alloc_block (const void *src, uint32_t value)
 Allocate one block of the data/operand cache.
 

Detailed Description

Cache management functionality.

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

Author
Megan Potter
Ruslan Rostovtsev
Andy Barajas