xref: /netbsd-src/sys/arch/prep/include/vmparam.h (revision 37b34d511dea595d3ba03a661cf3b775038ea5f8)
1 /*	$NetBSD: vmparam.h,v 1.9 2002/07/31 16:23:37 matt Exp $	*/
2 
3 #ifndef OLDPMAP
4 #define	USER_SR		11
5 #include <powerpc/mpc6xx/vmparam.h>
6 #else
7 /*-
8  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
9  * Copyright (C) 1995, 1996 TooLs GmbH.
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  * 3. All advertising materials mentioning features or use of this software
21  *    must display the following acknowledgement:
22  *	This product includes software developed by TooLs GmbH.
23  * 4. The name of TooLs GmbH may not be used to endorse or promote products
24  *    derived from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
27  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29  * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef	_MACHINE_VMPARAM_H_
39 #define	_MACHINE_VMPARAM_H_
40 
41 #define	USRTEXT		NBPG
42 #define	USRSTACK	VM_MAXUSER_ADDRESS
43 
44 #ifndef	MAXTSIZ
45 #define	MAXTSIZ		(16*1024*1024)		/* max text size */
46 #endif
47 
48 #ifndef	DFLDSIZ
49 #define	DFLDSIZ		(32*1024*1024)		/* default data size */
50 #endif
51 
52 #ifndef	MAXDSIZ
53 #define	MAXDSIZ		(512*1024*1024)		/* max data size */
54 #endif
55 
56 #ifndef	DFLSSIZ
57 #define	DFLSSIZ		(1*1024*1024)		/* default stack size */
58 #endif
59 
60 #ifndef	MAXSSIZ
61 #define	MAXSSIZ		(32*1024*1024)		/* max stack size */
62 #endif
63 
64 /*
65  * Size of shared memory map
66  */
67 #ifndef	SHMMAXPGS
68 #define	SHMMAXPGS	1024
69 #endif
70 
71 /*
72  * Size of User Raw I/O map
73  */
74 #define	USRIOSIZE	1024
75 
76 /*
77  * Would like to have MAX addresses = 0, but this doesn't (currently) work
78  */
79 #define	VM_MIN_ADDRESS		((vaddr_t)0)
80 #define	VM_MAXUSER_ADDRESS	((vaddr_t)0xfffff000)
81 #define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
82 #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)(KERNEL_SR << ADDR_SR_SHFT))
83 #define	VM_MAX_KERNEL_ADDRESS	(VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1)
84 
85 /* XXX max. amount of KVM to be used by buffers. */
86 #ifndef VM_MAX_KERNEL_BUF
87 #define	VM_MAX_KERNEL_BUF	(SEGMENT_LENGTH * 7 / 10)
88 #endif
89 
90 /*
91  * Override the default pager_map size, there's not enough KVA.
92  */
93 #define	PAGER_MAP_SIZE		(4 * 1024 * 1024)
94 
95 #define	VM_PHYS_SIZE		(USRIOSIZE * NBPG)
96 
97 #define	__HAVE_PMAP_PHYSSEG
98 
99 #ifndef _LOCORE
100 struct pmap_physseg {
101 	struct pv_entry *pvent;
102 	char *attrs;
103 };
104 #endif /* _LOCORE */
105 
106 #define VM_PHYSSEG_MAX		32
107 #define VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
108 #define VM_PHYSSEG_NOADD		/* can't add RAM after vm_mem_init */
109 
110 #define VM_NFREELIST		1
111 #define VM_FREELIST_DEFAULT	0
112 
113 #endif /* _MACHINE_VMPARAM_H_ */
114 #endif
115