xref: /openbsd/sys/arch/alpha/include/vmparam.h (revision fc61954a)
1 /* $OpenBSD: vmparam.h,v 1.28 2015/11/01 20:09:59 miod Exp $ */
2 /* $NetBSD: vmparam.h,v 1.18 2000/05/22 17:13:54 thorpej Exp $ */
3 
4 /*
5  * Copyright (c) 1988 University of Utah.
6  * Copyright (c) 1992, 1993
7  *	The Regents of the University of California.  All rights reserved.
8  *
9  * This code is derived from software contributed to Berkeley by
10  * the Systems Programming Group of the University of Utah Computer
11  * Science Department and Ralph Campbell.
12  *
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following conditions
15  * are met:
16  * 1. Redistributions of source code must retain the above copyright
17  *    notice, this list of conditions and the following disclaimer.
18  * 2. Redistributions in binary form must reproduce the above copyright
19  *    notice, this list of conditions and the following disclaimer in the
20  *    documentation and/or other materials provided with the distribution.
21  * 3. Neither the name of the University nor the names of its contributors
22  *    may be used to endorse or promote products derived from this software
23  *    without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35  * SUCH DAMAGE.
36  *
37  * from: Utah $Hdr: vmparam.h 1.16 91/01/18$
38  *
39  *	@(#)vmparam.h	8.2 (Berkeley) 4/22/94
40  */
41 
42 #ifndef	_MACHINE_VMPARAM_H_
43 #define	_MACHINE_VMPARAM_H_
44 
45 /*
46  * Machine dependent constants for Alpha.
47  */
48 
49 #define	USRSTACK	((vaddr_t)0x0000000200000000)		/* 8G */
50 
51 /*
52  * Virtual memory related constants, all in bytes
53  */
54 #ifndef MAXTSIZ
55 #define	MAXTSIZ		(1*1024*1024*1024)	/* max text size */
56 #endif
57 #ifndef DFLDSIZ
58 #define	DFLDSIZ		(128*1024*1024)		/* initial data size */
59 #endif
60 #ifndef MAXDSIZ
61 #define	MAXDSIZ		(1*1024*1024*1024)	/* max data size */
62 #endif
63 #ifndef BRKSIZ
64 #define	BRKSIZ		MAXDSIZ			/* heap gap size */
65 #endif
66 #ifndef	DFLSSIZ
67 #define	DFLSSIZ		(2*1024*1024)		/* initial stack size */
68 #endif
69 #ifndef	MAXSSIZ
70 #define	MAXSSIZ		(32*1024*1024)		/* max stack size */
71 #endif
72 
73 #define STACKGAP_RANDOM	256*1024
74 
75 /*
76  * PTEs for mapping user space into the kernel for physio operations.
77  * 64 pte's are enough to cover 8 disks * MAXBSIZE.
78  */
79 #ifndef USRIOSIZE
80 #define USRIOSIZE	64
81 #endif
82 
83 /*
84  * PTEs for system V style shared memory.
85  * This is basically slop for kmempt which we actually allocate (malloc) from.
86  */
87 #ifndef SHMMAXPGS
88 #define SHMMAXPGS	4096		/* 32mb */
89 #endif
90 
91 /*
92  * Mach derived constants
93  */
94 
95 /* user/kernel map constants */
96 #define VM_MIN_ADDRESS		((vaddr_t)PAGE_SIZE)
97 #define VM_MAXUSER_ADDRESS	((vaddr_t)(ALPHA_USEG_END + 1L))    /* 4T */
98 #define VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
99 #define VM_MIN_KERNEL_ADDRESS	((vaddr_t)ALPHA_K1SEG_BASE)
100 #define VM_MAX_KERNEL_ADDRESS	((vaddr_t)ALPHA_K1SEG_END)
101 
102 /* map PIE into the first quarter of the address space before stack */
103 #define VM_PIE_MIN_ADDR		PAGE_SIZE
104 #define VM_PIE_MAX_ADDR		0x80000000
105 
106 /* virtual sizes (bytes) for various kernel submaps */
107 #define VM_PHYS_SIZE		(USRIOSIZE * PAGE_SIZE)
108 
109 /* some Alpha-specific constants */
110 #define	VPTBASE		((vaddr_t)0xfffffffc00000000)	/* Virt. pg table */
111 
112 #define	VM_PHYSSEG_MAX		16		/* XXX */
113 #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
114 #define	VM_PHYSSEG_NOADD			/* no more after vm_mem_init */
115 
116 #endif	/* ! _MACHINE_VMPARAM_H_ */
117