cacheops.h revision 1.3 1 1.3 leo /* $NetBSD: cacheops.h,v 1.3 1998/09/02 11:16:31 leo Exp $ */
2 1.1 leo
3 1.1 leo /*-
4 1.1 leo * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 1.1 leo * All rights reserved.
6 1.1 leo *
7 1.1 leo * This code is derived from software contributed to The NetBSD Foundation
8 1.1 leo * by Leo Weppelman
9 1.1 leo *
10 1.1 leo * Redistribution and use in source and binary forms, with or without
11 1.1 leo * modification, are permitted provided that the following conditions
12 1.1 leo * are met:
13 1.1 leo * 1. Redistributions of source code must retain the above copyright
14 1.1 leo * notice, this list of conditions and the following disclaimer.
15 1.1 leo * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 leo * notice, this list of conditions and the following disclaimer in the
17 1.1 leo * documentation and/or other materials provided with the distribution.
18 1.1 leo * 3. All advertising materials mentioning features or use of this software
19 1.1 leo * must display the following acknowledgement:
20 1.1 leo * This product includes software developed by the NetBSD
21 1.1 leo * Foundation, Inc. and its contributors.
22 1.1 leo * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1 leo * contributors may be used to endorse or promote products derived
24 1.1 leo * from this software without specific prior written permission.
25 1.1 leo *
26 1.1 leo * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1 leo * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1 leo * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1 leo * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1 leo * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1 leo * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 leo * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 leo * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1 leo * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 leo * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1 leo * POSSIBILITY OF SUCH DAMAGE.
37 1.1 leo */
38 1.1 leo
39 1.1 leo #if notyet /* XXX */
40 1.1 leo #include <machine/cpuconf.h>
41 1.1 leo #endif
42 1.1 leo
43 1.1 leo #include <m68k/cacheops_20.h>
44 1.1 leo #include <m68k/cacheops_30.h>
45 1.1 leo #include <m68k/cacheops_40.h>
46 1.1 leo #include <m68k/cacheops_60.h>
47 1.1 leo
48 1.1 leo #if defined(M68020) && !(defined(M68030)||defined(M68040)||defined(M68060))
49 1.1 leo
50 1.1 leo #define TBIA() TBIA_20()
51 1.1 leo #define TBIS(va) TBIS_20((va))
52 1.1 leo #define TBIAS() TBIAS_20()
53 1.1 leo #define TBIAU() TBIAU_20()
54 1.1 leo #define ICIA() ICIA_20()
55 1.1 leo #define ICPA() ICPA_20()
56 1.1 leo #define DCIA() DCIA_20()
57 1.1 leo #define DCIS() DCIS_20()
58 1.1 leo #define DCIU() DCIU_20()
59 1.1 leo #define DCIAS() DCIAS_20()
60 1.1 leo #define PCIA() PCIA_20()
61 1.1 leo
62 1.1 leo #elif defined(M68030) && !(defined(M68020)||defined(M68040)||defined(M68060))
63 1.1 leo
64 1.1 leo #define TBIS(va) TBIS_30((va))
65 1.1 leo #define TBIAS() TBIAS_30()
66 1.1 leo #define TBIAU() TBIAU_30()
67 1.1 leo #define ICIA() ICIA_30()
68 1.1 leo #define ICPA() ICPA_30()
69 1.1 leo #define DCIA() DCIA_30()
70 1.1 leo #define DCIS() DCIS_30()
71 1.1 leo #define DCIU() DCIU_30()
72 1.1 leo #define DCIAS() DCIAS_30()
73 1.1 leo #define PCIA() PCIA_30()
74 1.1 leo
75 1.1 leo #elif defined(M68040) && !(defined(M68020)||defined(M68030)||defined(M68060))
76 1.1 leo
77 1.1 leo #define TBIA() TBIA_40()
78 1.1 leo #define TBIS(va) TBIS_40((va))
79 1.1 leo #define TBIAS() TBIAS_40()
80 1.1 leo #define TBIAU() TBIAU_40()
81 1.1 leo #define ICIA() ICIA_40()
82 1.1 leo #define ICPA() ICPA_40()
83 1.1 leo #define DCIA() DCIA_40()
84 1.1 leo #define DCIS() DCIS_40()
85 1.1 leo #define DCIU() DCIU_40()
86 1.1 leo #define DCIAS(va) DCIAS_40((va))
87 1.1 leo #define PCIA() PCIA_40()
88 1.2 leo #define DCFA() DCFA_40()
89 1.1 leo #define ICPL(va) ICPL_40((va))
90 1.1 leo #define ICPP(va) ICPP_40((va))
91 1.1 leo #define DCPL(va) DCPL_40((va))
92 1.1 leo #define DCPP(va) DCPP_40((va))
93 1.1 leo #define DCPA() DCPA_40()
94 1.1 leo #define DCFL(va) DCFL_40((va))
95 1.1 leo #define DCFP(va) DCFP_40((va))
96 1.1 leo
97 1.1 leo #elif defined(M68060) && !(defined(M68020)||defined(M68030)||defined(M68040))
98 1.1 leo
99 1.1 leo #define TBIA() TBIA_60()
100 1.1 leo #define TBIS(va) TBIS_60((va))
101 1.1 leo #define TBIAS() TBIAS_60()
102 1.1 leo #define TBIAU() TBIAU_60()
103 1.1 leo #define ICIA() ICIA_60()
104 1.1 leo #define ICPA() ICPA_60()
105 1.1 leo #define DCIA() DCIA_60()
106 1.1 leo #define DCIS() DCIS_60()
107 1.1 leo #define DCIU() DCIU_60()
108 1.1 leo #define DCIAS(va) DCIAS_60((va))
109 1.1 leo #define PCIA() PCIA_60()
110 1.2 leo #define DCFA() DCFA_60()
111 1.1 leo #define ICPL(va) ICPL_60((va))
112 1.1 leo #define ICPP(va) ICPP_60((va))
113 1.1 leo #define DCPL(va) DCPL_60((va))
114 1.1 leo #define DCPP(va) DCPP_60((va))
115 1.1 leo #define DCPA() DCPA_60()
116 1.1 leo #define DCFL(va) DCFL_60((va))
117 1.1 leo #define DCFP(va) DCFP_60((va))
118 1.1 leo
119 1.1 leo #else /* Multi-CPU config */
120 1.1 leo
121 1.1 leo /* XXX: From cpuconf.h? */
122 1.1 leo #ifndef _MULTI_CPU
123 1.1 leo #define _MULTI_CPU
124 1.1 leo #endif
125 1.1 leo
126 1.1 leo void _TBIA __P((void));
127 1.3 leo void _TBIS __P((vaddr_t));
128 1.1 leo void _TBIAS __P((void));
129 1.1 leo void _TBIAU __P((void));
130 1.1 leo void _ICIA __P((void));
131 1.1 leo void _ICPA __P((void));
132 1.1 leo void _DCIA __P((void));
133 1.1 leo void _DCIS __P((void));
134 1.1 leo void _DCIU __P((void));
135 1.3 leo void _DCIAS __P((vaddr_t));
136 1.1 leo
137 1.1 leo #define TBIA() _TBIA()
138 1.1 leo #define TBIS(va) _TBIS((va))
139 1.1 leo #define TBIAS() _TBIAS()
140 1.1 leo #define TBIAU() _TBIAU()
141 1.1 leo #define ICIA() _ICIA()
142 1.1 leo #define ICPA() _ICPA()
143 1.1 leo #define DCIA() _DCIA()
144 1.1 leo #define DCIS() _DCIS()
145 1.1 leo #define DCIU() _DCIU()
146 1.1 leo #define DCIAS(va) _DCIAS((va))
147 1.1 leo
148 1.1 leo #if defined(M68040)||defined(M68060)
149 1.1 leo
150 1.1 leo void _PCIA __P((void));
151 1.1 leo void _DCFA __P((void));
152 1.3 leo void _ICPL __P((paddr_t));
153 1.3 leo void _ICPP __P((paddr_t));
154 1.3 leo void _DCPL __P((paddr_t));
155 1.3 leo void _DCPP __P((paddr_t));
156 1.1 leo void _DCPA __P((void));
157 1.3 leo void _DCFL __P((paddr_t));
158 1.3 leo void _DCFP __P((paddr_t));
159 1.1 leo
160 1.1 leo #define PCIA() _PCIA()
161 1.1 leo #define DCFA() _DCFA()
162 1.3 leo #define ICPL(pa) _ICPL((pa))
163 1.3 leo #define ICPP(pa) _ICPP((pa))
164 1.3 leo #define DCPL(pa) _DCPL((pa))
165 1.3 leo #define DCPP(pa) _DCPP((pa))
166 1.1 leo #define DCPA() _DCPA()
167 1.3 leo #define DCFL(pa) _DCFL((pa))
168 1.3 leo #define DCFP(pa) _DCFP((pa))
169 1.1 leo
170 1.1 leo #endif /* defined(M68040)||defined(M68060) */
171 1.1 leo
172 1.1 leo #endif
173