No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / mips / include / cache_r10k.h
blobec5479c59056b1a01676c2275eccf987c76e572e
1 /* $NetBSD: cache_r10k.h,v 1.2.4.3 2004/09/21 13:18:39 skrll Exp $ */
3 /*
4 * Copyright (c) 2003 KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 * Copyright 2001 Wasabi Systems, Inc.
29 * All rights reserved.
31 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
33 * Redistribution and use in source and binary forms, with or without
34 * modification, are permitted provided that the following conditions
35 * are met:
36 * 1. Redistributions of source code must retain the above copyright
37 * notice, this list of conditions and the following disclaimer.
38 * 2. Redistributions in binary form must reproduce the above copyright
39 * notice, this list of conditions and the following disclaimer in the
40 * documentation and/or other materials provided with the distribution.
41 * 3. All advertising materials mentioning features or use of this software
42 * must display the following acknowledgement:
43 * This product includes software developed for the NetBSD Project by
44 * Wasabi Systems, Inc.
45 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
46 * or promote products derived from this software without specific prior
47 * written permission.
49 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
50 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
51 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
52 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
53 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
54 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
55 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
56 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
57 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
58 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
59 * POSSIBILITY OF SUCH DAMAGE.
63 * Cache definitions/operations for R10000-style caches.
66 #define CACHEOP_R10K_CBARRIER (5 << 2) /* I */
67 #define CACHEOP_R10K_IDX_LOAD_DATA (6 << 2) /* I, D, SD */
68 #define CACHEOP_R10K_IDX_STORE_DATA (7 << 2) /* SI, SD */
70 #if defined(_KERNEL) && !defined(_LOCORE)
72 void r10k_icache_sync_all(void);
73 void r10k_icache_sync_range(vaddr_t, vsize_t);
74 void r10k_icache_sync_range_index(vaddr_t, vsize_t);
75 void r10k_pdcache_wbinv_all(void);
76 void r10k_pdcache_wbinv_range(vaddr_t, vsize_t);
77 void r10k_pdcache_wbinv_range_index(vaddr_t, vsize_t);
78 void r10k_pdcache_inv_range(vaddr_t, vsize_t);
79 void r10k_pdcache_wb_range(vaddr_t, vsize_t);
80 void r10k_sdcache_wbinv_all(void);
81 void r10k_sdcache_wbinv_range(vaddr_t, vsize_t);
82 void r10k_sdcache_wbinv_range_index(vaddr_t, vsize_t);
83 void r10k_sdcache_inv_range(vaddr_t, vsize_t);
84 void r10k_sdcache_wb_range(vaddr_t, vsize_t);
86 #endif /* _KERNEL && !_LOCORE */