xref: /csrg-svn/sys/sparc/include/vmparam.h (revision 63320)
155128Storek /*
2*63320Sbostic  * Copyright (c) 1992, 1993
3*63320Sbostic  *	The Regents of the University of California.  All rights reserved.
455128Storek  *
555128Storek  * This software was developed by the Computer Systems Engineering group
655128Storek  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
755128Storek  * contributed to Berkeley.
855128Storek  *
955501Sbostic  * All advertising materials mentioning features or use of this software
1055501Sbostic  * must display the following acknowledgement:
1155501Sbostic  *	This product includes software developed by the University of
1259211Storek  *	California, Lawrence Berkeley Laboratory.
1355501Sbostic  *
1455128Storek  * %sccs.include.redist.c%
1555128Storek  *
16*63320Sbostic  *	@(#)vmparam.h	8.1 (Berkeley) 06/11/93
1755128Storek  *
1860353Storek  * from: $Header: vmparam.h,v 1.8 93/05/25 09:52:16 torek Exp $
1955128Storek  */
2055128Storek 
2155128Storek /*
2255128Storek  * Machine dependent constants for Sun-4c SPARC
2355128Storek  */
2455128Storek 
2555128Storek /*
2655128Storek  * USRTEXT is the start of the user text/data space, while USRSTACK
2755128Storek  * is the top (end) of the user stack.
2855128Storek  */
2955128Storek #define	USRTEXT		0x2000			/* Start of user text */
3055128Storek #define	USRSTACK	KERNBASE		/* Start of user stack */
3155128Storek 
3255128Storek /*
3355128Storek  * Virtual memory related constants, all in bytes
3455128Storek  */
3555128Storek #ifndef MAXTSIZ
3660353Storek #define	MAXTSIZ		(8*1024*1024)		/* max text size */
3755128Storek #endif
3855128Storek #ifndef DFLDSIZ
3960353Storek #define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
4055128Storek #endif
4155128Storek #ifndef MAXDSIZ
4260353Storek #define	MAXDSIZ		(64*1024*1024)		/* max data size */
4355128Storek #endif
4455128Storek #ifndef	DFLSSIZ
4555128Storek #define	DFLSSIZ		(512*1024)		/* initial stack size limit */
4655128Storek #endif
4755128Storek #ifndef	MAXSSIZ
4855128Storek #define	MAXSSIZ		MAXDSIZ			/* max stack size */
4955128Storek #endif
5055128Storek 
5155128Storek /*
5255128Storek  * Default sizes of swap allocation chunks (see dmap.h).
5355128Storek  * The actual values may be changed in vminit() based on MAXDSIZ.
5455128Storek  * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024.
5555128Storek  * DMMIN should be at least ctod(1) so that vtod() works.
5655128Storek  * vminit() insures this.
5755128Storek  */
5855128Storek #define	DMMIN	32			/* smallest swap allocation */
5955128Storek #define	DMMAX	4096			/* largest potential swap allocation */
6055128Storek #define	DMTEXT	1024			/* swap allocation for text */
6155128Storek 
6255128Storek /*
6355128Storek  * The time for a process to be blocked before being very swappable.
6455128Storek  * This is a number of seconds which the system takes as being a non-trivial
6555128Storek  * amount of real time.  You probably shouldn't change this;
6655128Storek  * it is used in subtle ways (fractions and multiples of it are, that is, like
6755128Storek  * half of a ``long time'', almost a long time, etc.)
6855128Storek  * It is related to human patience and other factors which don't really
6955128Storek  * change over time.
7055128Storek  */
7155128Storek #define	MAXSLP 		20
7255128Storek 
7355128Storek /*
7455128Storek  * A swapped in process is given a small amount of core without being bothered
7555128Storek  * by the page replacement algorithm.  Basically this says that if you are
7655128Storek  * swapped in you deserve some resources.  We protect the last SAFERSS
7755128Storek  * pages against paging and will just swap you out rather than paging you.
7855128Storek  * Note that each process has at least UPAGES+CLSIZE pages which are not
7955128Storek  * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
8055128Storek  * number just means a swapped in process is given around 25k bytes.
8155128Storek  * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
8255128Storek  * so we loan each swapped in process memory worth 100$, or just admit
8355128Storek  * that we don't consider it worthwhile and swap it out to disk which costs
8455128Storek  * $30/mb or about $0.75.
8555128Storek  */
8655128Storek #define	SAFERSS		4		/* nominal ``small'' resident set size
8755128Storek 					   protected against replacement */
8855128Storek 
8955128Storek /*
9055128Storek  * Mach derived constants
9155128Storek  */
9255128Storek 
9355128Storek /*
9455128Storek  * User/kernel map constants.  Note that sparc/vaddrs.h defines the
9555128Storek  * IO space virtual base, which must be the same as VM_MAX_KERNEL_ADDRESS:
9655128Storek  * tread with care.
9755128Storek  */
9855128Storek #define VM_MIN_ADDRESS		((vm_offset_t)0x2000)	/* texts start at 8K */
9955128Storek #define VM_MAX_ADDRESS		((vm_offset_t)KERNBASE)
10055128Storek #define VM_MAXUSER_ADDRESS	((vm_offset_t)KERNBASE)
10155128Storek #define VM_MIN_KERNEL_ADDRESS	((vm_offset_t)KERNBASE)
10255128Storek #define VM_MAX_KERNEL_ADDRESS	((vm_offset_t)0xfe000000)
10355128Storek 
10455128Storek /* virtual sizes (bytes) for various kernel submaps */
10555128Storek #define VM_MBUF_SIZE		(NMBCLUSTERS*MCLBYTES)
10655128Storek #define VM_KMEM_SIZE		(NKMEMCLUSTERS*CLBYTES)
107