1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
23*0Sstevel@tonic-gate /*	  All Rights Reserved  	*/
24*0Sstevel@tonic-gate 
25*0Sstevel@tonic-gate 
26*0Sstevel@tonic-gate /*
27*0Sstevel@tonic-gate  * Copyright (c) 1989,1999 by Sun Microsystems, Inc.
28*0Sstevel@tonic-gate  * All rights reserved.
29*0Sstevel@tonic-gate  */
30*0Sstevel@tonic-gate 
31*0Sstevel@tonic-gate #ifndef _SYS_VM_MACHPARAM_H
32*0Sstevel@tonic-gate #define	_SYS_VM_MACHPARAM_H
33*0Sstevel@tonic-gate 
34*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
35*0Sstevel@tonic-gate 
36*0Sstevel@tonic-gate #ifdef	__cplusplus
37*0Sstevel@tonic-gate extern "C" {
38*0Sstevel@tonic-gate #endif
39*0Sstevel@tonic-gate 
40*0Sstevel@tonic-gate /*
41*0Sstevel@tonic-gate  * Machine dependent constants for sun4u.
42*0Sstevel@tonic-gate  */
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate /*
45*0Sstevel@tonic-gate  * USRTEXT is the start of the user text/data space.
46*0Sstevel@tonic-gate  */
47*0Sstevel@tonic-gate #define	USRTEXT		0x2000
48*0Sstevel@tonic-gate 
49*0Sstevel@tonic-gate /*
50*0Sstevel@tonic-gate  * Virtual memory related constants for UNIX resource control, all in bytes
51*0Sstevel@tonic-gate  * The default stack size of 8M allows an optimization of mmu mapping
52*0Sstevel@tonic-gate  * resources so that in normal use a single mmu region map entry (smeg)
53*0Sstevel@tonic-gate  * can be used to map both the stack and shared libraries
54*0Sstevel@tonic-gate  */
55*0Sstevel@tonic-gate #define	MAXSSIZ		(0x7ffff000)	/* max stack size limit */
56*0Sstevel@tonic-gate #define	DFLSSIZ		(8*1024*1024)	/* initial stack size limit */
57*0Sstevel@tonic-gate 
58*0Sstevel@tonic-gate /*
59*0Sstevel@tonic-gate  * DSIZE_LIMIT and SSIZE_LIMIT exist to work-around an SVVS bug (1094085),
60*0Sstevel@tonic-gate  * and should be removed from the kernel (1094089)
61*0Sstevel@tonic-gate  */
62*0Sstevel@tonic-gate 
63*0Sstevel@tonic-gate #define	DSIZE_LIMIT	(USERLIMIT-USRTEXT)	/* physical data limit */
64*0Sstevel@tonic-gate #define	SSIZE_LIMIT	(0x7fffffff)	/* physical stack limit */
65*0Sstevel@tonic-gate 
66*0Sstevel@tonic-gate /*
67*0Sstevel@tonic-gate  * Minimum allowable virtual address space to be used
68*0Sstevel@tonic-gate  * by the seg_map segment driver for fast kernel mappings.
69*0Sstevel@tonic-gate  */
70*0Sstevel@tonic-gate #define	MINMAPSIZE	0x200000
71*0Sstevel@tonic-gate 
72*0Sstevel@tonic-gate /*
73*0Sstevel@tonic-gate  * The virtual address space to be used by the seg_map segment
74*0Sstevel@tonic-gate  * driver for fast kernel mappings.
75*0Sstevel@tonic-gate  *
76*0Sstevel@tonic-gate  * Size is 1/8th of physmem at boot.
77*0Sstevel@tonic-gate  */
78*0Sstevel@tonic-gate 
79*0Sstevel@tonic-gate #ifdef	_LP64
80*0Sstevel@tonic-gate #define	SEGMAPSIZE	(256L * 1024L * 1024L * 1024L)	/* 256G */
81*0Sstevel@tonic-gate #else
82*0Sstevel@tonic-gate #define	SEGMAPSIZE	(256 * 1024 * 1024)		/* 256M */
83*0Sstevel@tonic-gate #endif	/* _LP64 */
84*0Sstevel@tonic-gate 
85*0Sstevel@tonic-gate /*
86*0Sstevel@tonic-gate  * Define the default virtual size and valid size range for the segkp segment.
87*0Sstevel@tonic-gate  */
88*0Sstevel@tonic-gate #ifdef	_LP64
89*0Sstevel@tonic-gate #define	SEGKPDEFSIZE	(2L * 1024L * 1024L * 1024L)		/*   2G */
90*0Sstevel@tonic-gate #define	SEGKPMAXSIZE	(24L * 1024L * 1024L * 1024L)		/*  24G */
91*0Sstevel@tonic-gate #define	SEGKPMINSIZE	(512L * 1024 * 1024L)			/* 512M */
92*0Sstevel@tonic-gate #else
93*0Sstevel@tonic-gate #define	SEGKPDEFSIZE	(512 * 1024 * 1024)
94*0Sstevel@tonic-gate #define	SEGKPMAXSIZE	(512 * 1024 * 1024)
95*0Sstevel@tonic-gate #define	SEGKPMINSIZE	(512 * 1024 * 1024)
96*0Sstevel@tonic-gate #endif	/* _LP64 */
97*0Sstevel@tonic-gate 
98*0Sstevel@tonic-gate /*
99*0Sstevel@tonic-gate  * The time for a process to be blocked before being very swappable.
100*0Sstevel@tonic-gate  * This is a number of seconds which the system takes as being a non-trivial
101*0Sstevel@tonic-gate  * amount of real time. You probably shouldn't change this;
102*0Sstevel@tonic-gate  * it is used in subtle ways (fractions and multiples of it are, that is, like
103*0Sstevel@tonic-gate  * half of a ``long time'', almost a long time, etc.)
104*0Sstevel@tonic-gate  * It is related to human patience and other factors which don't really
105*0Sstevel@tonic-gate  * change over time.
106*0Sstevel@tonic-gate  */
107*0Sstevel@tonic-gate #define	MAXSLP 		20
108*0Sstevel@tonic-gate 
109*0Sstevel@tonic-gate /*
110*0Sstevel@tonic-gate  * A swapped in process is given a small amount of core without being bothered
111*0Sstevel@tonic-gate  * by the page replacement algorithm. Basically this says that if you are
112*0Sstevel@tonic-gate  * swapped in you deserve some resources. We protect the last SAFERSS
113*0Sstevel@tonic-gate  * pages against paging and will just swap you out rather than paging you.
114*0Sstevel@tonic-gate  * Note that each process has at least UPAGES pages which are not
115*0Sstevel@tonic-gate  * paged anyways so this number just means a swapped in process is
116*0Sstevel@tonic-gate  * given around 32k bytes.
117*0Sstevel@tonic-gate  */
118*0Sstevel@tonic-gate /*
119*0Sstevel@tonic-gate  * nominal ``small'' resident set size
120*0Sstevel@tonic-gate  * protected against replacement
121*0Sstevel@tonic-gate  */
122*0Sstevel@tonic-gate #define	SAFERSS		3
123*0Sstevel@tonic-gate 
124*0Sstevel@tonic-gate /*
125*0Sstevel@tonic-gate  * DISKRPM is used to estimate the number of paging i/o operations
126*0Sstevel@tonic-gate  * which one can expect from a single disk controller.
127*0Sstevel@tonic-gate  *
128*0Sstevel@tonic-gate  * XXX - The system doesn't account for multiple swap devices.
129*0Sstevel@tonic-gate  */
130*0Sstevel@tonic-gate #define	DISKRPM		60
131*0Sstevel@tonic-gate 
132*0Sstevel@tonic-gate /*
133*0Sstevel@tonic-gate  * The maximum value for handspreadpages which is the the distance
134*0Sstevel@tonic-gate  * between the two clock hands in pages.
135*0Sstevel@tonic-gate  */
136*0Sstevel@tonic-gate #define	MAXHANDSPREADPAGES	((64 * 1024 * 1024) / PAGESIZE)
137*0Sstevel@tonic-gate 
138*0Sstevel@tonic-gate /*
139*0Sstevel@tonic-gate  * Paged text files that are less than PGTHRESH bytes
140*0Sstevel@tonic-gate  * may be "prefaulted in" instead of demand paged.
141*0Sstevel@tonic-gate  */
142*0Sstevel@tonic-gate #define	PGTHRESH	(280 * 1024)
143*0Sstevel@tonic-gate 
144*0Sstevel@tonic-gate /*
145*0Sstevel@tonic-gate  * Cacheable bit for 64 bit MXCC Stream Source registers
146*0Sstevel@tonic-gate  */
147*0Sstevel@tonic-gate #define	BC_CACHE_SHIFT	36
148*0Sstevel@tonic-gate 
149*0Sstevel@tonic-gate /*
150*0Sstevel@tonic-gate  * set type for 64 bit phys addr variables.  Needed at least for interface
151*0Sstevel@tonic-gate  * with MXCC.
152*0Sstevel@tonic-gate  */
153*0Sstevel@tonic-gate 
154*0Sstevel@tonic-gate #ifndef _ASM
155*0Sstevel@tonic-gate typedef unsigned long long pa_t;
156*0Sstevel@tonic-gate #endif
157*0Sstevel@tonic-gate 
158*0Sstevel@tonic-gate #ifdef	__cplusplus
159*0Sstevel@tonic-gate }
160*0Sstevel@tonic-gate #endif
161*0Sstevel@tonic-gate 
162*0Sstevel@tonic-gate #endif	/* _SYS_VM_MACHPARAM_H */
163