xref: /netbsd/sys/arch/hppa/include/vmparam.h (revision c4a72b64)
1 /*	$NetBSD: vmparam.h,v 1.2 2002/08/05 20:58:35 fredette Exp $	*/
2 
3 /*	$OpenBSD: vmparam.h,v 1.17 2001/09/22 18:00:09 miod Exp $	*/
4 
5 /*
6  * Copyright (c) 1988-1994, The University of Utah and
7  * the Computer Systems Laboratory at the University of Utah (CSL).
8  * All rights reserved.
9  *
10  * Permission to use, copy, modify and distribute this software is hereby
11  * granted provided that (1) source code retains these copyright, permission,
12  * and disclaimer notices, and (2) redistributions including binaries
13  * reproduce the notices in supporting documentation, and (3) all advertising
14  * materials mentioning features or use of this software display the following
15  * acknowledgement: ``This product includes software developed by the
16  * Computer Systems Laboratory at the University of Utah.''
17  *
18  * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
19  * IS" CONDITION.  THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
20  * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
21  *
22  * CSL requests users of this software to return to csl-dist@cs.utah.edu any
23  * improvements that they make and grant CSL redistribution rights.
24  *
25  * 	Utah $Hdr: vmparam.h 1.16 94/12/16$
26  */
27 
28 #ifndef _HPPA_VMPARAM_H_
29 #define _HPPA_VMPARAM_H_
30 
31 /*
32  * Machine dependent constants for HP PA
33  */
34 /*
35  * USRTEXT is the start of the user text/data space, while USRSTACK
36  * is the top (end) of the user stack.  LOWPAGES and HIGHPAGES are
37  * the number of pages from the beginning of the P0 region to the
38  * beginning of the text and from the beginning of the P1 region to the
39  * beginning of the stack respectively.
40  */
41 #define	USRTEXT		0x00002000		/* Start of user .text */
42 #define	USRSTACK	0x68FF3000		/* Start of user stack */
43 #define	LOWPAGES	0
44 #define	HIGHPAGES	UPAGES
45 #define	SYSCALLGATE	0xC0000000		/* syscall gateway page */
46 
47 /* Alignment requirement for a uspace. */
48 #define	USPACE_ALIGN	NBPG
49 
50 /*
51  * Virtual memory related constants, all in bytes
52  */
53 #ifndef MAXTSIZ
54 #define	MAXTSIZ		(0x40000000)		/* max text size */
55 #endif
56 #ifndef DFLDSIZ
57 #define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
58 #endif
59 #ifndef MAXDSIZ
60 #define	MAXDSIZ		(USRSTACK-MAXTSIZ)	/* max data size */
61 #endif
62 #ifndef	DFLSSIZ
63 #define	DFLSSIZ		(512*1024)		/* initial stack size limit */
64 #endif
65 #ifndef	MAXSSIZ
66 #define	MAXSSIZ		(UADDR-USRSTACK)	/* max stack size */
67 #endif
68 
69 #ifndef USRIOSIZE
70 #define	USRIOSIZE	((2*HPPA_PGALIAS)/PAGE_SIZE)	/* 2mb */
71 #endif
72 
73 /*
74  * PTEs for system V style shared memory.
75  * This is basically slop for kmempt which we actually allocate (malloc) from.
76  */
77 #ifndef SHMMAXPGS
78 #define SHMMAXPGS	((1024*1024*10)/NBPG)	/* 10mb */
79 #endif
80 
81 /*
82  * The time for a process to be blocked before being very swappable.
83  * This is a number of seconds which the system takes as being a non-trivial
84  * amount of real time.  You probably shouldn't change this;
85  * it is used in subtle ways (fractions and multiples of it are, that is, like
86  * half of a ``long time'', almost a long time, etc.)
87  * It is related to human patience and other factors which don't really
88  * change over time.
89  */
90 #define	MAXSLP 		20
91 
92 /* user/kernel map constants */
93 #define	VM_MIN_ADDRESS		((vaddr_t)0)
94 #define	VM_MAXUSER_ADDRESS	((vaddr_t)0xc0000000)
95 #define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
96 #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)0)
97 #define	VM_MAX_KERNEL_ADDRESS	((vaddr_t)0xf0000000)
98 
99 /* virtual sizes (bytes) for various kernel submaps */
100 #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
101 
102 #define	VM_PHYSSEG_MAX	8	/* this many physmem segments */
103 #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
104 
105 #define	VM_PHYSSEG_NOADD	/* XXX until uvm code is fixed */
106 
107 #define	VM_NFREELIST		1
108 #define	VM_FREELIST_DEFAULT	0
109 
110 #endif	/* _HPPA_VMPARAM_H_ */
111 
112