]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/alpha/include/vmparam.h
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / sys / alpha / include / vmparam.h
1 /* $FreeBSD$ */
2 /* From: NetBSD: vmparam.h,v 1.6 1997/09/23 23:23:23 mjacob Exp */
3 #ifndef _ALPHA_VMPARAM_H
4 #define _ALPHA_VMPARAM_H
5 /*-
6  * Copyright (c) 1988 University of Utah.
7  * Copyright (c) 1992, 1993
8  *      The Regents of the University of California.  All rights reserved.
9  *
10  * This code is derived from software contributed to Berkeley by
11  * the Systems Programming Group of the University of Utah Computer
12  * Science Department and Ralph Campbell.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions
16  * are met:
17  * 1. Redistributions of source code must retain the above copyright
18  *    notice, this list of conditions and the following disclaimer.
19  * 2. Redistributions in binary form must reproduce the above copyright
20  *    notice, this list of conditions and the following disclaimer in the
21  *    documentation and/or other materials provided with the distribution.
22  * 4. Neither the name of the University nor the names of its contributors
23  *    may be used to endorse or promote products derived from this software
24  *    without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36  * SUCH DAMAGE.
37  *
38  * from: Utah $Hdr: vmparam.h 1.16 91/01/18$
39  *
40  *      @(#)vmparam.h   8.2 (Berkeley) 4/22/94
41  */
42
43 /*
44  * Machine dependent constants for Alpha.
45  */
46 /*
47  * USRTEXT is the start of the user text/data space, while USRSTACK
48  * is the top (end) of the user stack.  Immediately above the user stack
49  * resides the user structure, which is UPAGES long and contains the
50  * kernel stack.
51  */
52 #define USRTEXT         CLBYTES
53 /* #define      USRSTACK        VM_MAXUSER_ADDRESS */
54
55 /*
56  * This stack location is suitable for OSF1 emulation.  Some OSF
57  * programs are built as 32bit and assume that the stack is reachable
58  * with a 32bit value.  OSF1 manages to have a variable location for
59  * the user stack which we should probably also support.
60  */
61 #define USRSTACK        (0x12000000LL)
62
63 /*
64  * Virtual memory related constants, all in bytes
65  */
66 #ifndef MAXTSIZ
67 #define MAXTSIZ         (1<<30)                 /* max text size (1G) */
68 #endif
69 #ifndef DFLDSIZ
70 #define DFLDSIZ         (1<<27)                 /* initial data size (128M) */
71 #endif
72 #ifndef MAXDSIZ
73 #define MAXDSIZ         (1<<30)                 /* max data size (1G) */
74 #endif
75 #ifndef DFLSSIZ
76 #define DFLSSIZ         (1<<21)                 /* initial stack size (2M) */
77 #endif
78 #ifndef MAXSSIZ
79 #define MAXSSIZ         (1<<25)                 /* max stack size (32M) */
80 #endif
81 #ifndef SGROWSIZ
82 #define SGROWSIZ        (128UL*1024)            /* amount to grow stack */
83 #endif
84
85 /*
86  * PTEs for mapping user space into the kernel for phyio operations.
87  * 64 pte's are enough to cover 8 disks * MAXBSIZE.
88  */
89 #ifndef USRIOSIZE
90 #define USRIOSIZE       64
91 #endif
92
93 /*
94  * Boundary at which to place first MAPMEM segment if not explicitly
95  * specified.  Should be a power of two.  This allows some slop for
96  * the data segment to grow underneath the first mapped segment.
97  */
98 #define MMSEG           0x200000
99
100 /*
101  * The size of the clock loop.
102  */
103 #define LOOPPAGES       (maxfree - firstfree)
104
105 /*
106  * The time for a process to be blocked before being very swappable.
107  * This is a number of seconds which the system takes as being a non-trivial
108  * amount of real time.  You probably shouldn't change this;
109  * it is used in subtle ways (fractions and multiples of it are, that is, like
110  * half of a ``long time'', almost a long time, etc.)
111  * It is related to human patience and other factors which don't really
112  * change over time.
113  */
114 #define MAXSLP          20
115
116 /*
117  * A swapped in process is given a small amount of core without being bothered
118  * by the page replacement algorithm.  Basically this says that if you are
119  * swapped in you deserve some resources.  We protect the last SAFERSS
120  * pages against paging and will just swap you out rather than paging you.
121  * Note that each process has at least UPAGES+CLSIZE pages which are not
122  * paged anyways, in addition to SAFERSS.
123  */
124 #define SAFERSS         10              /* nominal ``small'' resident set size
125                                            protected against replacement */
126
127 /*
128  * Alpha provides a machine specific single page allocator through the use
129  * of K0SEG.
130  */
131 #define UMA_MD_SMALL_ALLOC
132
133 /*
134  * Mach derived constants
135  */
136
137 /* user/kernel map constants */
138 #define VM_MIN_ADDRESS          (ALPHA_USEG_BASE) /* 0 */
139 #define VM_MAXUSER_ADDRESS      ((ALPHA_USEG_END + 1LL))
140 #define VM_MAX_ADDRESS          VM_MAXUSER_ADDRESS
141 #define VM_MIN_KERNEL_ADDRESS   (ALPHA_K1SEG_BASE)
142 #define VM_MAX_KERNEL_ADDRESS   (ALPHA_K1SEG_END)
143
144 /* virtual sizes (bytes) for various kernel submaps */
145 #ifndef VM_KMEM_SIZE
146 #define VM_KMEM_SIZE            (12 * 1024 * 1024)
147 #endif
148
149 /*
150  * How many physical pages per KVA page allocated.
151  * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
152  * is the total KVA space allocated for kmem_map.
153  */
154 #ifndef VM_KMEM_SIZE_SCALE
155 #define VM_KMEM_SIZE_SCALE      (4) /* XXX 8192 byte pages */
156 #endif
157
158 /* initial pagein size of beginning of executable file */
159 #ifndef VM_INITIAL_PAGEIN
160 #define VM_INITIAL_PAGEIN       16
161 #endif
162
163 /* some Alpha-specific constants */
164 #define VPTBASE         (0xfffffffe00000000LL) /* Virt. pg table */
165 #endif  /* !_ALPHA_VMPARAM_H */