39#define ARCH_CACHE_L1_ICACHE_SIZE (8 * 1024)
40#define ARCH_CACHE_L1_ICACHE_ASSOC 1
41#define ARCH_CACHE_L1_ICACHE_LINESIZE 32
43#define ARCH_CACHE_L1_DCACHE_SIZE (16 * 1024)
44#define ARCH_CACHE_L1_DCACHE_ASSOC 1
45#define ARCH_CACHE_L1_DCACHE_LINESIZE 32
47#define ARCH_CACHE_L2_CACHE_SIZE 0
48#define ARCH_CACHE_L2_CACHE_ASSOC 0
49#define ARCH_CACHE_L2_CACHE_LINESIZE 0
54__depr(
"dcache_wback_sq is deprecated. Use sq_flush() from <dc/sq.h>")
56 __asm__ __volatile__(
"pref @%0\n"
64 __builtin_prefetch(src);
68 uintptr_t *ptr = (uintptr_t *)src;
70 __asm__ (
"movca.l r0, @%8\n\t"
79 :
"r" (ptr),
"z"(value)
88 register uint32_t r0 __asm__(
"r0");
95 uint32_t *ptr = (uint32_t *)((uintptr_t)src & ~0x1f);
99 ptr[1] = ptr[2] = ptr[3] = ptr[4] = ptr[5] = ptr[6] = ptr[7] = 0;
103 uintptr_t *ptr = (uintptr_t *)src;
105 __asm__ (
"ocbi @%8\n\t"
119 uintptr_t *ptr = (uintptr_t *)src;
121 __asm__ (
"ocbp @%8\n\t"
135 uintptr_t *ptr = (uintptr_t *)src;
137 __asm__ (
"ocbwb @%8\n\t"
161 volatile uint32_t *dca = (
volatile uint32_t *)0xf4000008;
163 for (i = 0; i < 512; i++, dca += 8)
186 volatile uint32_t *dca = (
volatile uint32_t *)0xf4000008;
188 for (i = 0; i < 512; i++, dca += 8)
Various common macros used throughout the codebase.
#define __is_defined(macro)
Check if a macro is defined to 1.
Definition cdefs.h:189
Cache management functionality.
void arch_icache_sync_range(uintptr_t start, size_t count)
void arch_icache_inval_range(uintptr_t start, size_t count)
static void arch_dcache_wback_range(uintptr_t start, size_t count)
Definition cache.h:167
static void arch_dcache_purge_range(uintptr_t start, size_t count)
Definition cache.h:203
static __always_inline void dcache_wback_sq(void *src)
Definition cache.h:55
static void arch_dcache_alloc_line(void *src)
Definition cache.h:83
static void arch_dcache_alloc_line_with_value(void *src, uintptr_t value)
Definition cache.h:67
#define ARCH_CACHE_L1_DCACHE_SIZE
Definition cache.h:43
static void arch_dcache_wback_all(void)
Definition cache.h:159
static void arch_dcache_inval_line(void *src)
Definition cache.h:102
static void arch_dcache_wback_line(void *src)
Definition cache.h:134
static void arch_dcache_zero_alloc_line(void *src)
Definition cache.h:94
static void arch_dcache_purge_line(void *src)
Definition cache.h:118
static void arch_dcache_inval_range(uintptr_t start, size_t count)
Definition cache.h:150
static void arch_dcache_pref_line(const void *src)
Definition cache.h:63
static void arch_dcache_purge_all(void)
Definition cache.h:182
static char buffer[256]
Definition porthelper.c:11
Macros to help dealing with register fields.
#define BIT(bit)
Create a 32-bit mask with a bit set.
Definition regfield.h:27