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