xref: /minix3/sys/arch/evbarm/include/vmparam.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*	$NetBSD: vmparam.h,v 1.29 2015/02/23 20:34:38 joerg Exp $	*/
2b1c4ba4aSLionel Sambuc 
3b1c4ba4aSLionel Sambuc /*
4b1c4ba4aSLionel Sambuc  * Copyright (c) 1988 The Regents of the University of California.
5b1c4ba4aSLionel Sambuc  * All rights reserved.
6b1c4ba4aSLionel Sambuc  *
7b1c4ba4aSLionel Sambuc  * Redistribution and use in source and binary forms, with or without
8b1c4ba4aSLionel Sambuc  * modification, are permitted provided that the following conditions
9b1c4ba4aSLionel Sambuc  * are met:
10b1c4ba4aSLionel Sambuc  * 1. Redistributions of source code must retain the above copyright
11b1c4ba4aSLionel Sambuc  *    notice, this list of conditions and the following disclaimer.
12b1c4ba4aSLionel Sambuc  * 2. Redistributions in binary form must reproduce the above copyright
13b1c4ba4aSLionel Sambuc  *    notice, this list of conditions and the following disclaimer in the
14b1c4ba4aSLionel Sambuc  *    documentation and/or other materials provided with the distribution.
15b1c4ba4aSLionel Sambuc  * 3. Neither the name of the University nor the names of its contributors
16b1c4ba4aSLionel Sambuc  *    may be used to endorse or promote products derived from this software
17b1c4ba4aSLionel Sambuc  *    without specific prior written permission.
18b1c4ba4aSLionel Sambuc  *
19b1c4ba4aSLionel Sambuc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20b1c4ba4aSLionel Sambuc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21b1c4ba4aSLionel Sambuc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22b1c4ba4aSLionel Sambuc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23b1c4ba4aSLionel Sambuc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24b1c4ba4aSLionel Sambuc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25b1c4ba4aSLionel Sambuc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26b1c4ba4aSLionel Sambuc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27b1c4ba4aSLionel Sambuc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28b1c4ba4aSLionel Sambuc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29b1c4ba4aSLionel Sambuc  * SUCH DAMAGE.
30b1c4ba4aSLionel Sambuc  */
31b1c4ba4aSLionel Sambuc 
32b1c4ba4aSLionel Sambuc #ifndef	_EVBARM_VMPARAM_H_
33b1c4ba4aSLionel Sambuc #define	_EVBARM_VMPARAM_H_
34b1c4ba4aSLionel Sambuc 
3581473dbbSBen Gras #if defined(_KERNEL) || defined(_KMEMUSER) || defined(__minix)
36b1c4ba4aSLionel Sambuc 
37b1c4ba4aSLionel Sambuc #include <arm/arm32/vmparam.h>
38b1c4ba4aSLionel Sambuc 
39b1c4ba4aSLionel Sambuc /*
40b1c4ba4aSLionel Sambuc  * Address space constants
41b1c4ba4aSLionel Sambuc  */
42b1c4ba4aSLionel Sambuc 
43b1c4ba4aSLionel Sambuc /*
44b1c4ba4aSLionel Sambuc  * The line between user space and kernel space
45b1c4ba4aSLionel Sambuc  * Mappings >= KERNEL_BASE are constant across all processes
46b1c4ba4aSLionel Sambuc  */
47b1c4ba4aSLionel Sambuc #ifdef KERNEL_BASE_EXT
48b1c4ba4aSLionel Sambuc #define	KERNEL_BASE		KERNEL_BASE_EXT
49b1c4ba4aSLionel Sambuc #else
50b1c4ba4aSLionel Sambuc #define	KERNEL_BASE		0x80000000
51b1c4ba4aSLionel Sambuc #endif
52b1c4ba4aSLionel Sambuc 
53b1c4ba4aSLionel Sambuc /*
54b1c4ba4aSLionel Sambuc  * Size of User Raw I/O map
55b1c4ba4aSLionel Sambuc  */
56b1c4ba4aSLionel Sambuc 
57b1c4ba4aSLionel Sambuc #define USRIOSIZE       300
58b1c4ba4aSLionel Sambuc 
59b1c4ba4aSLionel Sambuc /* virtual sizes (bytes) for various kernel submaps */
60b1c4ba4aSLionel Sambuc 
61b1c4ba4aSLionel Sambuc #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
62b1c4ba4aSLionel Sambuc 
63b1c4ba4aSLionel Sambuc /*
64b1c4ba4aSLionel Sambuc  * max number of non-contig chunks of physical RAM you can have
65b1c4ba4aSLionel Sambuc  */
66b1c4ba4aSLionel Sambuc 
67b1c4ba4aSLionel Sambuc #define	VM_PHYSSEG_MAX		32
68b1c4ba4aSLionel Sambuc 
69b1c4ba4aSLionel Sambuc /*
70b1c4ba4aSLionel Sambuc  * when converting a physical address to a vm_page structure, we
71b1c4ba4aSLionel Sambuc  * want to use a binary search on the chunks of physical memory
72b1c4ba4aSLionel Sambuc  * to find our RAM
73b1c4ba4aSLionel Sambuc  */
74b1c4ba4aSLionel Sambuc 
75b1c4ba4aSLionel Sambuc #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
76b1c4ba4aSLionel Sambuc 
77b1c4ba4aSLionel Sambuc /*
78b1c4ba4aSLionel Sambuc  * we support 2 free lists:
79b1c4ba4aSLionel Sambuc  *
80b1c4ba4aSLionel Sambuc  *	- DEFAULT for all systems
81b1c4ba4aSLionel Sambuc  *	- ISADMA for the ISA DMA range on Sharks only
82b1c4ba4aSLionel Sambuc  */
83b1c4ba4aSLionel Sambuc 
84b1c4ba4aSLionel Sambuc #define	VM_NFREELIST		2
85b1c4ba4aSLionel Sambuc #define	VM_FREELIST_DEFAULT	0
86b1c4ba4aSLionel Sambuc #define	VM_FREELIST_ISADMA	1
87b1c4ba4aSLionel Sambuc 
88b1c4ba4aSLionel Sambuc #endif /* _KERNEL || _KMEMUSER */
89b1c4ba4aSLionel Sambuc 
90b1c4ba4aSLionel Sambuc #endif	/* _EVBARM_VMPARAM_H_ */
91