xref: /netbsd-src/sys/arch/hppa/include/vmparam.h (revision 23c8222edbfb0f0932d88a8351d3a0cf817dfb9e)
1 /*	$NetBSD: vmparam.h,v 1.6 2004/07/18 23:21:35 chs 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 /*
36  * We use 4K pages on the HP PHA.  Override the PAGE_* definitions
37  * to be compile-time constants.
38  */
39 #define	PAGE_SHIFT	12
40 #define	PAGE_SIZE	(1 << PAGE_SHIFT)
41 #define	PAGE_MASK	(PAGE_SIZE - 1)
42 
43 /*
44  * USRSTACK is the top (end) of the user stack.
45  */
46 #define	USRSTACK	0x70000000		/* Start of user stack */
47 #define	SYSCALLGATE	0xC0000000		/* syscall gateway page */
48 
49 /* Alignment requirement for a uspace. */
50 #define	USPACE_ALIGN	PAGE_SIZE
51 
52 /*
53  * Virtual memory related constants, all in bytes
54  */
55 #ifndef MAXTSIZ
56 #define	MAXTSIZ		(0x40000000)		/* max text size */
57 #endif
58 #ifndef DFLDSIZ
59 #define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
60 #endif
61 #ifndef MAXDSIZ
62 #define	MAXDSIZ		(USRSTACK-MAXTSIZ)	/* max data size */
63 #endif
64 #ifndef	DFLSSIZ
65 #define	DFLSSIZ		(512*1024)		/* initial stack size limit */
66 #endif
67 #ifndef	MAXSSIZ
68 #define	MAXSSIZ		(256*1024*1024)	/* max stack size */
69 #endif
70 
71 #ifndef USRIOSIZE
72 #define	USRIOSIZE	((2*HPPA_PGALIAS)/PAGE_SIZE)	/* 2mb */
73 #endif
74 
75 /*
76  * PTEs for system V style shared memory.
77  * This is basically slop for kmempt which we actually allocate (malloc) from.
78  */
79 #ifndef SHMMAXPGS
80 #define SHMMAXPGS	((1024*1024*10)/PAGE_SIZE)	/* 10mb */
81 #endif
82 
83 /*
84  * The time for a process to be blocked before being very swappable.
85  * This is a number of seconds which the system takes as being a non-trivial
86  * amount of real time.  You probably shouldn't change this;
87  * it is used in subtle ways (fractions and multiples of it are, that is, like
88  * half of a ``long time'', almost a long time, etc.)
89  * It is related to human patience and other factors which don't really
90  * change over time.
91  */
92 #define	MAXSLP 		20
93 
94 /* user/kernel map constants */
95 #define	VM_MIN_ADDRESS		((vaddr_t)0)
96 #define	VM_MAXUSER_ADDRESS	((vaddr_t)0xc0000000)
97 #define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
98 #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)0)
99 #define	VM_MAX_KERNEL_ADDRESS	((vaddr_t)0xf0000000)
100 
101 /* virtual sizes (bytes) for various kernel submaps */
102 #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
103 
104 #define	VM_PHYSSEG_MAX	8	/* this many physmem segments */
105 #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
106 
107 #define	VM_PHYSSEG_NOADD	/* XXX until uvm code is fixed */
108 
109 #define	VM_NFREELIST		1
110 #define	VM_FREELIST_DEFAULT	0
111 
112 #endif	/* _HPPA_VMPARAM_H_ */
113