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)
84 uintptr_t *ptr = (uintptr_t *)src;
86 __asm__ (
"movca.l r0, @%8\n\t"
100 uint32_t *ptr = (uint32_t *)((uintptr_t)src & ~0x1f);
104 ptr[1] = ptr[2] = ptr[3] = ptr[4] = ptr[5] = ptr[6] = ptr[7] = 0;
108 uintptr_t *ptr = (uintptr_t *)src;
110 __asm__ (
"ocbi @%8\n\t"
124 uintptr_t *ptr = (uintptr_t *)src;
126 __asm__ (
"ocbp @%8\n\t"
140 uintptr_t *ptr = (uintptr_t *)src;
142 __asm__ (
"ocbwb @%8\n\t"
166 volatile uint32_t *dca = (
volatile uint32_t *)0xf4000008;
168 for (i = 0; i < 512; i++, dca += 8)
191 volatile uint32_t *dca = (
volatile uint32_t *)0xf4000008;
193 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:172
static void arch_dcache_purge_range(uintptr_t start, size_t count)
Definition cache.h:208
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:164
static void arch_dcache_inval_line(void *src)
Definition cache.h:107
static void arch_dcache_wback_line(void *src)
Definition cache.h:139
static void arch_dcache_zero_alloc_line(void *src)
Definition cache.h:99
static void arch_dcache_purge_line(void *src)
Definition cache.h:123
static void arch_dcache_inval_range(uintptr_t start, size_t count)
Definition cache.h:155
static void arch_dcache_pref_line(const void *src)
Definition cache.h:63
static void arch_dcache_purge_all(void)
Definition cache.h:187
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