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