xref: /netbsd-src/sys/arch/arc/include/wired_map.h (revision 712239e3662915dbada26401d85412d74aa15305)
1*712239e3Sthorpej /*	$NetBSD: wired_map.h,v 1.3 2007/02/21 22:59:38 thorpej Exp $	*/
2fdb3b14bStsutsui 
3fdb3b14bStsutsui /*-
4fdb3b14bStsutsui  * Copyright (C) 2000 Shuichiro URATA.  All rights reserved.
5fdb3b14bStsutsui  *
6fdb3b14bStsutsui  * Redistribution and use in source and binary forms, with or without
7fdb3b14bStsutsui  * modification, are permitted provided that the following conditions
8fdb3b14bStsutsui  * are met:
9fdb3b14bStsutsui  * 1. Redistributions of source code must retain the above copyright
10fdb3b14bStsutsui  *    notice, this list of conditions and the following disclaimer.
11fdb3b14bStsutsui  * 2. Redistributions in binary form must reproduce the above copyright
12fdb3b14bStsutsui  *    notice, this list of conditions and the following disclaimer in the
13fdb3b14bStsutsui  *    documentation and/or other materials provided with the distribution.
14fdb3b14bStsutsui  * 3. The name of the author may not be used to endorse or promote products
15fdb3b14bStsutsui  *    derived from this software without specific prior written permission.
16fdb3b14bStsutsui  *
17fdb3b14bStsutsui  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18fdb3b14bStsutsui  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19fdb3b14bStsutsui  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20fdb3b14bStsutsui  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21fdb3b14bStsutsui  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22fdb3b14bStsutsui  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23fdb3b14bStsutsui  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24fdb3b14bStsutsui  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25fdb3b14bStsutsui  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26fdb3b14bStsutsui  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27fdb3b14bStsutsui  */
28fdb3b14bStsutsui 
29fdb3b14bStsutsui #define MIPS3_NWIRED_ENTRY	8
30fdb3b14bStsutsui #define MIPS3_WIRED_SIZE	MIPS3_PG_SIZE_MASK_TO_SIZE(MIPS3_PG_SIZE_16M)
31fdb3b14bStsutsui 
32fdb3b14bStsutsui #ifndef ARC_THRESHOLD_TO_USE_WIRED_TLB	/* tunable */
33fdb3b14bStsutsui #define ARC_THRESHOLD_TO_USE_WIRED_TLB	(256 * 1024)
34fdb3b14bStsutsui #endif
35fdb3b14bStsutsui 
36fdb3b14bStsutsui #include <mips/wired_map.h>
37fdb3b14bStsutsui 
38fdb3b14bStsutsui void	arc_init_wired_map(void);
39fdb3b14bStsutsui void	arc_wired_enter_page(vaddr_t, paddr_t, vsize_t);
40fdb3b14bStsutsui vaddr_t	arc_contiguously_wired_mapped(paddr_t, vsize_t);
41fdb3b14bStsutsui vaddr_t	arc_map_wired(paddr_t, vsize_t);
42*712239e3Sthorpej bool	 arc_wired_map_extract(vaddr_t, paddr_t *);
43