2025-02-10 11:20:42 -08:00
|
|
|
#ifndef _DOLPHIN_OSCACHE_H_
|
|
|
|
|
#define _DOLPHIN_OSCACHE_H_
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
#include <dolphin/types.h>
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2022-08-30 14:22:17 -07:00
|
|
|
#ifdef __cplusplus
|
2021-05-03 02:03:24 +02:00
|
|
|
extern "C" {
|
2022-08-30 14:22:17 -07:00
|
|
|
#endif
|
|
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
void DCInvalidateRange(void* addr, u32 nBytes);
|
|
|
|
|
void DCFlushRange(void* addr, u32 nBytes);
|
|
|
|
|
void DCStoreRange(void* addr, u32 nBytes);
|
|
|
|
|
void DCFlushRangeNoSync(void* addr, u32 nBytes);
|
|
|
|
|
void DCStoreRangeNoSync(void* addr, u32 nBytes);
|
|
|
|
|
void DCZeroRange(void* addr, u32 nBytes);
|
|
|
|
|
void DCTouchRange(void* addr, u32 nBytes);
|
|
|
|
|
void ICInvalidateRange(void* addr, u32 nBytes);
|
|
|
|
|
|
|
|
|
|
#define LC_BASE_PREFIX 0xE000
|
|
|
|
|
#define LC_BASE (LC_BASE_PREFIX << 16)
|
|
|
|
|
#define LCGetBase() ((void*)LC_BASE)
|
|
|
|
|
|
2022-08-30 14:22:17 -07:00
|
|
|
void LCEnable(void);
|
|
|
|
|
void LCDisable(void);
|
2025-02-10 11:20:42 -08:00
|
|
|
void LCLoadBlocks(void* destTag, void* srcAddr, u32 numBlocks);
|
|
|
|
|
void LCStoreBlocks(void* destAddr, void* srcTag, u32 numBlocks);
|
|
|
|
|
u32 LCLoadData(void* destAddr, void* srcAddr, u32 nBytes);
|
2022-08-30 14:22:17 -07:00
|
|
|
u32 LCStoreData(void* destAddr, void* srcAddr, u32 nBytes);
|
2025-02-10 11:20:42 -08:00
|
|
|
u32 LCQueueLength(void);
|
2022-08-30 14:22:17 -07:00
|
|
|
void LCQueueWait(u32 len);
|
2025-02-10 11:20:42 -08:00
|
|
|
void LCFlushQueue(void);
|
2022-08-30 14:22:17 -07:00
|
|
|
void __OSCacheInit(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2025-02-10 11:20:42 -08:00
|
|
|
}
|
2022-08-30 14:22:17 -07:00
|
|
|
#endif
|
2021-05-03 02:03:24 +02:00
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
#endif
|