vmparam.h revision 125184
1/*-
2 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
3 * Copyright (C) 1995, 1996 TooLs GmbH.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 *    notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 *    notice, this list of conditions and the following disclaimer in the
13 *    documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 *    must display the following acknowledgement:
16 *	This product includes software developed by TooLs GmbH.
17 * 4. The name of TooLs GmbH may not be used to endorse or promote products
18 *    derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 *	$NetBSD: vmparam.h,v 1.11 2000/02/11 19:25:16 thorpej Exp $
32 * $FreeBSD: head/sys/powerpc/include/vmparam.h 125184 2004-01-29 00:32:22Z grehan $
33 */
34
35#ifndef _MACHINE_VMPARAM_H_
36#define	_MACHINE_VMPARAM_H_
37
38#define	USRTEXT		NBPG
39#define	USRSTACK	VM_MAXUSER_ADDRESS
40
41#ifndef	MAXTSIZ
42#define	MAXTSIZ		(16*1024*1024)		/* max text size */
43#endif
44
45#ifndef	DFLDSIZ
46#define	DFLDSIZ		(32*1024*1024)		/* default data size */
47#endif
48
49#ifndef	MAXDSIZ
50#define	MAXDSIZ		(512*1024*1024)		/* max data size */
51#endif
52
53#ifndef	DFLSSIZ
54#define	DFLSSIZ		(1*1024*1024)		/* default stack size */
55#endif
56
57#ifndef	MAXSSIZ
58#define	MAXSSIZ		(32*1024*1024)		/* max stack size */
59#endif
60
61/*
62 * Size of shared memory map
63 */
64#ifndef	SHMMAXPGS
65#define	SHMMAXPGS	1024
66#endif
67
68/*
69 * Size of User Raw I/O map
70 */
71#define	USRIOSIZE	1024
72
73/*
74 * The time for a process to be blocked before being very swappable.
75 * This is a number of seconds which the system takes as being a non-trivial
76 * amount of real time.  You probably shouldn't change this;
77 * it is used in subtle ways (fractions and multiples of it are, that is, like
78 * half of a ``long time'', almost a long time, etc.)
79 * It is related to human patience and other factors which don't really
80 * change over time.
81 */
82#define	MAXSLP 		20
83
84/*
85 * Use the direct-mapped BAT registers for UMA small allocs. This
86 * takes pressure off the small amount of available KVA.
87 */
88#define UMA_MD_SMALL_ALLOC
89
90/*
91 * Would like to have MAX addresses = 0, but this doesn't (currently) work
92 */
93#define	VM_MIN_ADDRESS		((vm_offset_t)0)
94#define	VM_MAXUSER_ADDRESS	((vm_offset_t)0x7ffff000)
95#define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
96#define	VM_MIN_KERNEL_ADDRESS	((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT))
97#define	VM_MAX_KERNEL_ADDRESS	(VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1)
98
99/* XXX max. amount of KVM to be used by buffers. */
100#ifndef VM_MAX_KERNEL_BUF
101#define	VM_MAX_KERNEL_BUF	(SEGMENT_LENGTH * 7 / 10)
102#endif
103
104#define	VM_PHYS_SIZE		(USRIOSIZE * NBPG)
105
106struct pmap_physseg {
107	struct pv_entry *pvent;
108	char *attrs;
109};
110
111#define	VM_PHYSSEG_MAX		16	/* 1? */
112#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
113#define	VM_PHYSSEG_NOADD		/* can't add RAM after vm_mem_init */
114
115#define	VM_NFREELIST		1
116#define	VM_FREELIST_DEFAULT	0
117
118#ifndef VM_INITIAL_PAGEIN
119#define	VM_INITIAL_PAGEIN	16
120#endif
121
122#ifndef SGROWSIZ
123#define	SGROWSIZ	(128UL*1024)		/* amount to grow stack */
124#endif
125
126#ifndef VM_KMEM_SIZE
127#define	VM_KMEM_SIZE		(12 * 1024 * 1024)
128#endif
129
130#endif /* _MACHINE_VMPARAM_H_ */
131