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