xref: /openbsd/sys/arch/hppa/include/vmparam.h (revision 859223f3)
1*859223f3Smickey /*	$OpenBSD: vmparam.h,v 1.23 2002/09/05 18:41:19 mickey Exp $	*/
2e55ab885Smickey 
3e55ab885Smickey /*
4e55ab885Smickey  * Copyright (c) 1988-1994, The University of Utah and
5e55ab885Smickey  * the Computer Systems Laboratory at the University of Utah (CSL).
6e55ab885Smickey  * All rights reserved.
7e55ab885Smickey  *
8e55ab885Smickey  * Permission to use, copy, modify and distribute this software is hereby
9e55ab885Smickey  * granted provided that (1) source code retains these copyright, permission,
10e55ab885Smickey  * and disclaimer notices, and (2) redistributions including binaries
11e55ab885Smickey  * reproduce the notices in supporting documentation, and (3) all advertising
12e55ab885Smickey  * materials mentioning features or use of this software display the following
13e55ab885Smickey  * acknowledgement: ``This product includes software developed by the
14e55ab885Smickey  * Computer Systems Laboratory at the University of Utah.''
15e55ab885Smickey  *
16e55ab885Smickey  * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
17e55ab885Smickey  * IS" CONDITION.  THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
18e55ab885Smickey  * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
19e55ab885Smickey  *
20e55ab885Smickey  * CSL requests users of this software to return to csl-dist@cs.utah.edu any
21e55ab885Smickey  * improvements that they make and grant CSL redistribution rights.
22e55ab885Smickey  *
23e55ab885Smickey  * 	Utah $Hdr: vmparam.h 1.16 94/12/16$
24e55ab885Smickey  */
25e55ab885Smickey 
26343a9f2aSmickey #ifndef _MACHINE_VMPARAM_H_
27343a9f2aSmickey #define _MACHINE_VMPARAM_H_
28e55ab885Smickey 
29e55ab885Smickey /*
30e55ab885Smickey  * Machine dependent constants for HP PA
31e55ab885Smickey  */
32e55ab885Smickey /*
33e55ab885Smickey  * USRTEXT is the start of the user text/data space, while USRSTACK
34e55ab885Smickey  * is the top (end) of the user stack.  LOWPAGES and HIGHPAGES are
35e55ab885Smickey  * the number of pages from the beginning of the P0 region to the
36e55ab885Smickey  * beginning of the text and from the beginning of the P1 region to the
37e55ab885Smickey  * beginning of the stack respectively.
38e55ab885Smickey  */
39fc80caebSmickey #define	USRTEXT		0x00002000		/* Start of user .text */
40e55ab885Smickey #define	USRSTACK	0x68FF3000		/* Start of user stack */
41e55ab885Smickey #define	LOWPAGES	0
42e55ab885Smickey #define	HIGHPAGES	UPAGES
439fbfe4d3Smickey #define	SYSCALLGATE	0xC0000000		/* syscall gateway page */
44e55ab885Smickey 
45e55ab885Smickey /*
46e55ab885Smickey  * Virtual memory related constants, all in bytes
47e55ab885Smickey  */
48e55ab885Smickey #ifndef MAXTSIZ
4976fcfe46Smickey #define	MAXTSIZ		(0x40000000)		/* max text size */
50e55ab885Smickey #endif
51e55ab885Smickey #ifndef DFLDSIZ
52e55ab885Smickey #define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
53e55ab885Smickey #endif
54e55ab885Smickey #ifndef MAXDSIZ
5576fcfe46Smickey #define	MAXDSIZ		(USRSTACK-MAXTSIZ)	/* max data size */
56e55ab885Smickey #endif
57e55ab885Smickey #ifndef	DFLSSIZ
58e55ab885Smickey #define	DFLSSIZ		(512*1024)		/* initial stack size limit */
59e55ab885Smickey #endif
60e55ab885Smickey #ifndef	MAXSSIZ
6176fcfe46Smickey #define	MAXSSIZ		(UADDR-USRSTACK)	/* max stack size */
62e55ab885Smickey #endif
63e55ab885Smickey 
64343a9f2aSmickey #ifndef USRIOSIZE
65c7ba784cSart #define	USRIOSIZE	((2*HPPA_PGALIAS)/PAGE_SIZE)	/* 2mb */
66343a9f2aSmickey #endif
67e55ab885Smickey 
68e55ab885Smickey /*
69e55ab885Smickey  * PTEs for system V style shared memory.
70e55ab885Smickey  * This is basically slop for kmempt which we actually allocate (malloc) from.
71e55ab885Smickey  */
72e55ab885Smickey #ifndef SHMMAXPGS
73e55ab885Smickey #define SHMMAXPGS	((1024*1024*10)/NBPG)	/* 10mb */
74e55ab885Smickey #endif
75e55ab885Smickey 
76e55ab885Smickey /*
77e55ab885Smickey  * The time for a process to be blocked before being very swappable.
78e55ab885Smickey  * This is a number of seconds which the system takes as being a non-trivial
79e55ab885Smickey  * amount of real time.  You probably shouldn't change this;
80e55ab885Smickey  * it is used in subtle ways (fractions and multiples of it are, that is, like
81e55ab885Smickey  * half of a ``long time'', almost a long time, etc.)
82e55ab885Smickey  * It is related to human patience and other factors which don't really
83e55ab885Smickey  * change over time.
84e55ab885Smickey  */
85e55ab885Smickey #define	MAXSLP 		20
86e55ab885Smickey 
87e55ab885Smickey /* user/kernel map constants */
884eadd93aSmickey #define	VM_MIN_ADDRESS		((vaddr_t)0)
894eadd93aSmickey #define	VM_MAXUSER_ADDRESS	((vaddr_t)0xc0000000)
90e55ab885Smickey #define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
91*859223f3Smickey #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)0xc0001000)
9291811916Smickey #define	VM_MAX_KERNEL_ADDRESS	((vaddr_t)0xf0000000)
93e55ab885Smickey 
94e55ab885Smickey /* virtual sizes (bytes) for various kernel submaps */
95c7ba784cSart #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
96e55ab885Smickey 
979fbfe4d3Smickey #define	VM_PHYSSEG_MAX	8	/* this many physmem segments */
989fbfe4d3Smickey #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
999fbfe4d3Smickey 
10091811916Smickey #define	VM_PHYSSEG_NOADD	/* XXX until uvm code is fixed */
10191811916Smickey 
1024eadd93aSmickey #define	VM_NFREELIST		2
1034eadd93aSmickey #define	VM_FREELIST_DEFAULT	0
104*859223f3Smickey #define	VM_FREELIST_ARCH	1
1054eadd93aSmickey 
106b52cdc0aSmickey #ifndef _LOCORE
1073df937b5Sart #define __HAVE_PMAP_PHYSSEG
108428ad8bbSmickey struct pmap_physseg {
109a228f8d2Smickey 	struct pv_head *pvhead;
110428ad8bbSmickey };
111879ffe42Smickey #endif
112428ad8bbSmickey 
113343a9f2aSmickey #endif	/* _MACHINE_VMPARAM_H_ */
114428ad8bbSmickey 
115