xref: /netbsd-src/sys/arch/mips/include/cache_mipsNN.h (revision 1b968d3ccff46aa0efca0e693c6b75e27af37339)
1*1b968d3cSsimonb /*	$NetBSD: cache_mipsNN.h,v 1.6 2020/07/26 08:08:41 simonb Exp $	*/
2cae6e0e5Ssimonb 
3cae6e0e5Ssimonb /*
4cae6e0e5Ssimonb  * Copyright 2002 Wasabi Systems, Inc.
5cae6e0e5Ssimonb  * All rights reserved.
6cae6e0e5Ssimonb  *
7cae6e0e5Ssimonb  * Written by Simon Burge for Wasabi Systems, Inc.
8cae6e0e5Ssimonb  *
9cae6e0e5Ssimonb  * Redistribution and use in source and binary forms, with or without
10cae6e0e5Ssimonb  * modification, are permitted provided that the following conditions
11cae6e0e5Ssimonb  * are met:
12cae6e0e5Ssimonb  * 1. Redistributions of source code must retain the above copyright
13cae6e0e5Ssimonb  *    notice, this list of conditions and the following disclaimer.
14cae6e0e5Ssimonb  * 2. Redistributions in binary form must reproduce the above copyright
15cae6e0e5Ssimonb  *    notice, this list of conditions and the following disclaimer in the
16cae6e0e5Ssimonb  *    documentation and/or other materials provided with the distribution.
17cae6e0e5Ssimonb  * 3. All advertising materials mentioning features or use of this software
18cae6e0e5Ssimonb  *    must display the following acknowledgement:
19cae6e0e5Ssimonb  *	This product includes software developed for the NetBSD Project by
20cae6e0e5Ssimonb  *	Wasabi Systems, Inc.
21cae6e0e5Ssimonb  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22cae6e0e5Ssimonb  *    or promote products derived from this software without specific prior
23cae6e0e5Ssimonb  *    written permission.
24cae6e0e5Ssimonb  *
25cae6e0e5Ssimonb  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26cae6e0e5Ssimonb  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27cae6e0e5Ssimonb  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28cae6e0e5Ssimonb  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
29cae6e0e5Ssimonb  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30cae6e0e5Ssimonb  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31cae6e0e5Ssimonb  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32cae6e0e5Ssimonb  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33cae6e0e5Ssimonb  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34cae6e0e5Ssimonb  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35cae6e0e5Ssimonb  * POSSIBILITY OF SUCH DAMAGE.
36cae6e0e5Ssimonb  */
37cae6e0e5Ssimonb 
38d7e78fcfSmatt #ifndef _MIPS_CACHE_MIPSNN_H_
39d7e78fcfSmatt #define	_MIPS_CACHE_MIPSNN_H_
40d7e78fcfSmatt 
4112c35ee2Ssimonb void	mipsNN_cache_init(uint32_t, uint32_t);
4212c35ee2Ssimonb 
43d7e78fcfSmatt void	mipsNN_picache_sync_all(void);
44d7e78fcfSmatt void	mipsNN_picache_sync_range(register_t, vsize_t);
45d7e78fcfSmatt void	mipsNN_picache_sync_range_index(vaddr_t, vsize_t);
46d7e78fcfSmatt 
47d7e78fcfSmatt void	mipsNN_pdcache_wbinv_all(void);
48d7e78fcfSmatt void	mipsNN_pdcache_wbinv_range_index(vaddr_t, vsize_t);
49d7e78fcfSmatt 
50d7e78fcfSmatt void	mipsNN_sdcache_wbinv_all(void);
51d7e78fcfSmatt void	mipsNN_sdcache_wbinv_range_index(vaddr_t, vsize_t);
52d7e78fcfSmatt 
53d7e78fcfSmatt #endif /* _MIPS_CACHE_MIPSNN_H_ */
54