Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
/*	$NetBSD: cache_r4k.h,v 1.10 2003/03/08 04:43:26 rafal Exp $	*/

/*
 * Copyright 2001 Wasabi Systems, Inc.
 * All rights reserved.
 *
 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed for the NetBSD Project by
 *	Wasabi Systems, Inc.
 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
 *    or promote products derived from this software without specific prior
 *    written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

/*
 * Cache definitions/operations for R4000-style caches.
 */

#define	CACHE_R4K_I			0
#define	CACHE_R4K_D			1
#define	CACHE_R4K_SI			2
#define	CACHE_R4K_SD			3

#define	CACHEOP_R4K_INDEX_INV		(0 << 2)	/* I, SI */
#define	CACHEOP_R4K_INDEX_WB_INV	(0 << 2)	/* D, SD */
#define	CACHEOP_R4K_INDEX_LOAD_TAG	(1 << 2)	/* all */
#define	CACHEOP_R4K_INDEX_STORE_TAG	(2 << 2)	/* all */
#define	CACHEOP_R4K_CREATE_DIRTY_EXCL	(3 << 2)	/* D, SD */
#define	CACHEOP_R4K_HIT_INV		(4 << 2)	/* all */
#define	CACHEOP_R4K_HIT_WB_INV		(5 << 2)	/* D, SD */
#define	CACHEOP_R4K_FILL		(5 << 2)	/* I */
#define	CACHEOP_R4K_HIT_WB		(6 << 2)	/* I, D, SD */
#define	CACHEOP_R4K_HIT_SET_VIRTUAL	(7 << 2)	/* SI, SD */

#if !defined(LOCORE)

/*
 * cache_r4k_op_line:
 *
 *	Perform the specified cache operation on a single line.
 */
#define	cache_op_r4k_line(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0(%0)				\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_8lines_16:
 *
 *	Perform the specified cache operation on 8 16-byte cache lines.
 */
#define	cache_r4k_op_8lines_16(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x00(%0); cache %1, 0x10(%0)		\n\t"	\
		"cache %1, 0x20(%0); cache %1, 0x30(%0)		\n\t"	\
		"cache %1, 0x40(%0); cache %1, 0x50(%0)		\n\t"	\
		"cache %1, 0x60(%0); cache %1, 0x70(%0)		\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_8lines_32:
 *
 *	Perform the specified cache operation on 8 32-byte cache lines.
 */
#define	cache_r4k_op_8lines_32(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x00(%0); cache %1, 0x20(%0)		\n\t"	\
		"cache %1, 0x40(%0); cache %1, 0x60(%0)		\n\t"	\
		"cache %1, 0x80(%0); cache %1, 0xa0(%0)		\n\t"	\
		"cache %1, 0xc0(%0); cache %1, 0xe0(%0)		\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_8lines_64:
 *
 *	Perform the specified cache operation on 8 64-byte cache lines.
 */
#define	cache_r4k_op_8lines_64(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x000(%0); cache %1, 0x040(%0)	\n\t"	\
		"cache %1, 0x080(%0); cache %1, 0x0c0(%0)	\n\t"	\
		"cache %1, 0x100(%0); cache %1, 0x140(%0)	\n\t"	\
		"cache %1, 0x180(%0); cache %1, 0x1c0(%0)	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_32lines_16:
 *
 *	Perform the specified cache operation on 32 16-byte
 *	cache lines.
 */
#define	cache_r4k_op_32lines_16(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x000(%0); cache %1, 0x010(%0);	\n\t"	\
		"cache %1, 0x020(%0); cache %1, 0x030(%0);	\n\t"	\
		"cache %1, 0x040(%0); cache %1, 0x050(%0);	\n\t"	\
		"cache %1, 0x060(%0); cache %1, 0x070(%0);	\n\t"	\
		"cache %1, 0x080(%0); cache %1, 0x090(%0);	\n\t"	\
		"cache %1, 0x0a0(%0); cache %1, 0x0b0(%0);	\n\t"	\
		"cache %1, 0x0c0(%0); cache %1, 0x0d0(%0);	\n\t"	\
		"cache %1, 0x0e0(%0); cache %1, 0x0f0(%0);	\n\t"	\
		"cache %1, 0x100(%0); cache %1, 0x110(%0);	\n\t"	\
		"cache %1, 0x120(%0); cache %1, 0x130(%0);	\n\t"	\
		"cache %1, 0x140(%0); cache %1, 0x150(%0);	\n\t"	\
		"cache %1, 0x160(%0); cache %1, 0x170(%0);	\n\t"	\
		"cache %1, 0x180(%0); cache %1, 0x190(%0);	\n\t"	\
		"cache %1, 0x1a0(%0); cache %1, 0x1b0(%0);	\n\t"	\
		"cache %1, 0x1c0(%0); cache %1, 0x1d0(%0);	\n\t"	\
		"cache %1, 0x1e0(%0); cache %1, 0x1f0(%0);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_32lines_32:
 *
 *	Perform the specified cache operation on 32 32-byte
 *	cache lines.
 */
#define	cache_r4k_op_32lines_32(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x000(%0); cache %1, 0x020(%0);	\n\t"	\
		"cache %1, 0x040(%0); cache %1, 0x060(%0);	\n\t"	\
		"cache %1, 0x080(%0); cache %1, 0x0a0(%0);	\n\t"	\
		"cache %1, 0x0c0(%0); cache %1, 0x0e0(%0);	\n\t"	\
		"cache %1, 0x100(%0); cache %1, 0x120(%0);	\n\t"	\
		"cache %1, 0x140(%0); cache %1, 0x160(%0);	\n\t"	\
		"cache %1, 0x180(%0); cache %1, 0x1a0(%0);	\n\t"	\
		"cache %1, 0x1c0(%0); cache %1, 0x1e0(%0);	\n\t"	\
		"cache %1, 0x200(%0); cache %1, 0x220(%0);	\n\t"	\
		"cache %1, 0x240(%0); cache %1, 0x260(%0);	\n\t"	\
		"cache %1, 0x280(%0); cache %1, 0x2a0(%0);	\n\t"	\
		"cache %1, 0x2c0(%0); cache %1, 0x2e0(%0);	\n\t"	\
		"cache %1, 0x300(%0); cache %1, 0x320(%0);	\n\t"	\
		"cache %1, 0x340(%0); cache %1, 0x360(%0);	\n\t"	\
		"cache %1, 0x380(%0); cache %1, 0x3a0(%0);	\n\t"	\
		"cache %1, 0x3c0(%0); cache %1, 0x3e0(%0);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_32lines_64:
 *
 *	Perform the specified cache operation on 32 64-byte
 *	cache lines.
 */
#define	cache_r4k_op_32lines_64(va, op)					\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x000(%0); cache %1, 0x040(%0);	\n\t"	\
		"cache %1, 0x080(%0); cache %1, 0x0c0(%0);	\n\t"	\
		"cache %1, 0x100(%0); cache %1, 0x140(%0);	\n\t"	\
		"cache %1, 0x180(%0); cache %1, 0x1c0(%0);	\n\t"	\
		"cache %1, 0x200(%0); cache %1, 0x240(%0);	\n\t"	\
		"cache %1, 0x280(%0); cache %1, 0x2c0(%0);	\n\t"	\
		"cache %1, 0x300(%0); cache %1, 0x340(%0);	\n\t"	\
		"cache %1, 0x380(%0); cache %1, 0x3c0(%0);	\n\t"	\
		"cache %1, 0x400(%0); cache %1, 0x440(%0);	\n\t"	\
		"cache %1, 0x480(%0); cache %1, 0x4c0(%0);	\n\t"	\
		"cache %1, 0x500(%0); cache %1, 0x540(%0);	\n\t"	\
		"cache %1, 0x580(%0); cache %1, 0x5c0(%0);	\n\t"	\
		"cache %1, 0x600(%0); cache %1, 0x640(%0);	\n\t"	\
		"cache %1, 0x680(%0); cache %1, 0x6c0(%0);	\n\t"	\
		"cache %1, 0x700(%0); cache %1, 0x740(%0);	\n\t"	\
		"cache %1, 0x780(%0); cache %1, 0x7c0(%0);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_32lines_128:
 *
 *	Perform the specified cache operation on 32 128-byte
 *	cache lines.
 */
#define	cache_r4k_op_32lines_128(va, op)				\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %1, 0x0000(%0); cache %1, 0x0080(%0);	\n\t"	\
		"cache %1, 0x0100(%0); cache %1, 0x0180(%0);	\n\t"	\
		"cache %1, 0x0200(%0); cache %1, 0x0280(%0);	\n\t"	\
		"cache %1, 0x0300(%0); cache %1, 0x0380(%0);	\n\t"	\
		"cache %1, 0x0400(%0); cache %1, 0x0480(%0);	\n\t"	\
		"cache %1, 0x0500(%0); cache %1, 0x0580(%0);	\n\t"	\
		"cache %1, 0x0600(%0); cache %1, 0x0680(%0);	\n\t"	\
		"cache %1, 0x0700(%0); cache %1, 0x0780(%0);	\n\t"	\
		"cache %1, 0x0800(%0); cache %1, 0x0880(%0);	\n\t"	\
		"cache %1, 0x0900(%0); cache %1, 0x0980(%0);	\n\t"	\
		"cache %1, 0x0a00(%0); cache %1, 0x0a80(%0);	\n\t"	\
		"cache %1, 0x0b00(%0); cache %1, 0x0b80(%0);	\n\t"	\
		"cache %1, 0x0c00(%0); cache %1, 0x0c80(%0);	\n\t"	\
		"cache %1, 0x0d00(%0); cache %1, 0x0d80(%0);	\n\t"	\
		"cache %1, 0x0e00(%0); cache %1, 0x0e80(%0);	\n\t"	\
		"cache %1, 0x0f00(%0); cache %1, 0x0f80(%0);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va), "i" (op)					\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_16lines_16_2way:
 *
 *	Perform the specified cache operation on 16 16-byte
 * 	cache lines, 2-ways.
 */
#define	cache_r4k_op_16lines_16_2way(va1, va2, op)			\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %2, 0x000(%0); cache %2, 0x000(%1);	\n\t"	\
		"cache %2, 0x010(%0); cache %2, 0x010(%1);	\n\t"	\
		"cache %2, 0x020(%0); cache %2, 0x020(%1);	\n\t"	\
		"cache %2, 0x030(%0); cache %2, 0x030(%1);	\n\t"	\
		"cache %2, 0x040(%0); cache %2, 0x040(%1);	\n\t"	\
		"cache %2, 0x050(%0); cache %2, 0x050(%1);	\n\t"	\
		"cache %2, 0x060(%0); cache %2, 0x060(%1);	\n\t"	\
		"cache %2, 0x070(%0); cache %2, 0x070(%1);	\n\t"	\
		"cache %2, 0x080(%0); cache %2, 0x080(%1);	\n\t"	\
		"cache %2, 0x090(%0); cache %2, 0x090(%1);	\n\t"	\
		"cache %2, 0x0a0(%0); cache %2, 0x0a0(%1);	\n\t"	\
		"cache %2, 0x0b0(%0); cache %2, 0x0b0(%1);	\n\t"	\
		"cache %2, 0x0c0(%0); cache %2, 0x0c0(%1);	\n\t"	\
		"cache %2, 0x0d0(%0); cache %2, 0x0d0(%1);	\n\t"	\
		"cache %2, 0x0e0(%0); cache %2, 0x0e0(%1);	\n\t"	\
		"cache %2, 0x0f0(%0); cache %2, 0x0f0(%1);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va1), "r" (va2), "i" (op)				\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_16lines_32_2way:
 *
 *	Perform the specified cache operation on 16 32-byte
 * 	cache lines, 2-ways.
 */
#define	cache_r4k_op_16lines_32_2way(va1, va2, op)			\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %2, 0x000(%0); cache %2, 0x000(%1);	\n\t"	\
		"cache %2, 0x020(%0); cache %2, 0x020(%1);	\n\t"	\
		"cache %2, 0x040(%0); cache %2, 0x040(%1);	\n\t"	\
		"cache %2, 0x060(%0); cache %2, 0x060(%1);	\n\t"	\
		"cache %2, 0x080(%0); cache %2, 0x080(%1);	\n\t"	\
		"cache %2, 0x0a0(%0); cache %2, 0x0a0(%1);	\n\t"	\
		"cache %2, 0x0c0(%0); cache %2, 0x0c0(%1);	\n\t"	\
		"cache %2, 0x0e0(%0); cache %2, 0x0e0(%1);	\n\t"	\
		"cache %2, 0x100(%0); cache %2, 0x100(%1);	\n\t"	\
		"cache %2, 0x120(%0); cache %2, 0x120(%1);	\n\t"	\
		"cache %2, 0x140(%0); cache %2, 0x140(%1);	\n\t"	\
		"cache %2, 0x160(%0); cache %2, 0x160(%1);	\n\t"	\
		"cache %2, 0x180(%0); cache %2, 0x180(%1);	\n\t"	\
		"cache %2, 0x1a0(%0); cache %2, 0x1a0(%1);	\n\t"	\
		"cache %2, 0x1c0(%0); cache %2, 0x1c0(%1);	\n\t"	\
		"cache %2, 0x1e0(%0); cache %2, 0x1e0(%1);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va1), "r" (va2), "i" (op)				\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_8lines_16_4way:
 *
 *	Perform the specified cache operation on 8 16-byte
 * 	cache lines, 4-ways.
 */
#define	cache_r4k_op_8lines_16_4way(va1, va2, va3, va4, op)		\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %4, 0x000(%0); cache %4, 0x000(%1);	\n\t"	\
		"cache %4, 0x000(%2); cache %4, 0x000(%3);	\n\t"	\
		"cache %4, 0x010(%0); cache %4, 0x010(%1);	\n\t"	\
		"cache %4, 0x010(%2); cache %4, 0x010(%3);	\n\t"	\
		"cache %4, 0x020(%0); cache %4, 0x020(%1);	\n\t"	\
		"cache %4, 0x020(%2); cache %4, 0x020(%3);	\n\t"	\
		"cache %4, 0x030(%0); cache %4, 0x030(%1);	\n\t"	\
		"cache %4, 0x030(%2); cache %4, 0x030(%3);	\n\t"	\
		"cache %4, 0x040(%0); cache %4, 0x040(%1);	\n\t"	\
		"cache %4, 0x040(%2); cache %4, 0x040(%3);	\n\t"	\
		"cache %4, 0x050(%0); cache %4, 0x050(%1);	\n\t"	\
		"cache %4, 0x050(%2); cache %4, 0x050(%3);	\n\t"	\
		"cache %4, 0x060(%0); cache %4, 0x060(%1);	\n\t"	\
		"cache %4, 0x060(%2); cache %4, 0x060(%3);	\n\t"	\
		"cache %4, 0x070(%0); cache %4, 0x070(%1);	\n\t"	\
		"cache %4, 0x070(%2); cache %4, 0x070(%3);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va1), "r" (va2), "r" (va3), "r" (va4), "i" (op)	\
	    : "memory");						\
} while (/*CONSTCOND*/0)

/*
 * cache_r4k_op_8lines_32_4way:
 *
 *	Perform the specified cache operation on 8 32-byte
 * 	cache lines, 4-ways.
 */
#define	cache_r4k_op_8lines_32_4way(va1, va2, va3, va4, op)		\
do {									\
	__asm __volatile(						\
		".set noreorder					\n\t"	\
		"cache %4, 0x000(%0); cache %4, 0x000(%1);	\n\t"	\
		"cache %4, 0x000(%2); cache %4, 0x000(%3);	\n\t"	\
		"cache %4, 0x020(%0); cache %4, 0x020(%1);	\n\t"	\
		"cache %4, 0x020(%2); cache %4, 0x020(%3);	\n\t"	\
		"cache %4, 0x040(%0); cache %4, 0x040(%1);	\n\t"	\
		"cache %4, 0x040(%2); cache %4, 0x040(%3);	\n\t"	\
		"cache %4, 0x060(%0); cache %4, 0x060(%1);	\n\t"	\
		"cache %4, 0x060(%2); cache %4, 0x060(%3);	\n\t"	\
		"cache %4, 0x080(%0); cache %4, 0x080(%1);	\n\t"	\
		"cache %4, 0x080(%2); cache %4, 0x080(%3);	\n\t"	\
		"cache %4, 0x0a0(%0); cache %4, 0x0a0(%1);	\n\t"	\
		"cache %4, 0x0a0(%2); cache %4, 0x0a0(%3);	\n\t"	\
		"cache %4, 0x0c0(%0); cache %4, 0x0c0(%1);	\n\t"	\
		"cache %4, 0x0c0(%2); cache %4, 0x0c0(%3);	\n\t"	\
		"cache %4, 0x0e0(%0); cache %4, 0x0e0(%1);	\n\t"	\
		"cache %4, 0x0e0(%2); cache %4, 0x0e0(%3);	\n\t"	\
		".set reorder"						\
	    :								\
	    : "r" (va1), "r" (va2), "r" (va3), "r" (va4), "i" (op)	\
	    : "memory");						\
} while (/*CONSTCOND*/0)

void	r4k_icache_sync_all_16(void);
void	r4k_icache_sync_range_16(vm_paddr_t, vm_size_t);
void	r4k_icache_sync_range_index_16(vm_paddr_t, vm_size_t);

void	r4k_icache_sync_all_32(void);
void	r4k_icache_sync_range_32(vm_paddr_t, vm_size_t);
void	r4k_icache_sync_range_index_32(vm_paddr_t, vm_size_t);

void	r4k_pdcache_wbinv_all_16(void);
void	r4k_pdcache_wbinv_range_16(vm_paddr_t, vm_size_t);
void	r4k_pdcache_wbinv_range_index_16(vm_paddr_t, vm_size_t);

void	r4k_pdcache_inv_range_16(vm_paddr_t, vm_size_t);
void	r4k_pdcache_wb_range_16(vm_paddr_t, vm_size_t);

void	r4k_pdcache_wbinv_all_32(void);
void	r4k_pdcache_wbinv_range_32(vm_paddr_t, vm_size_t);
void	r4k_pdcache_wbinv_range_index_32(vm_paddr_t, vm_size_t);

void	r4k_pdcache_inv_range_32(vm_paddr_t, vm_size_t);
void	r4k_pdcache_wb_range_32(vm_paddr_t, vm_size_t);

void	r4k_sdcache_wbinv_all_32(void);
void	r4k_sdcache_wbinv_range_32(vm_paddr_t, vm_size_t);
void	r4k_sdcache_wbinv_range_index_32(vm_paddr_t, vm_size_t);

void	r4k_sdcache_inv_range_32(vm_paddr_t, vm_size_t);
void	r4k_sdcache_wb_range_32(vm_paddr_t, vm_size_t);

void	r4k_sdcache_wbinv_all_128(void);
void	r4k_sdcache_wbinv_range_128(vm_paddr_t, vm_size_t);
void	r4k_sdcache_wbinv_range_index_128(vm_paddr_t, vm_size_t);

void	r4k_sdcache_inv_range_128(vm_paddr_t, vm_size_t);
void	r4k_sdcache_wb_range_128(vm_paddr_t, vm_size_t);

void	r4k_sdcache_wbinv_all_generic(void);
void	r4k_sdcache_wbinv_range_generic(vm_paddr_t, vm_size_t);
void	r4k_sdcache_wbinv_range_index_generic(vm_paddr_t, vm_size_t);

void	r4k_sdcache_inv_range_generic(vm_paddr_t, vm_size_t);
void	r4k_sdcache_wb_range_generic(vm_paddr_t, vm_size_t);

#endif /* !LOCORE */