Annotation of sys/arch/mips64/include/vmparam.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: vmparam.h,v 1.13 2007/05/03 19:34:00 miod Exp $ */
2: /* $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd 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: * @(#)vmparam.h 8.2 (Berkeley) 4/22/94
39: */
40:
41: #ifndef _MIPS_VMPARAM_H_
42: #define _MIPS_VMPARAM_H_
43:
44: /*
45: * Machine dependent constants mips processors.
46: */
47: /*
48: * USRTEXT is the start of the user text/data space, while USRSTACK
49: * is the top (end) of the user stack.
50: */
51: #define USRTEXT 0x0000000000400000L
52: #define USRSTACK 0x0000000080000000L /* Start of user stack */
53:
54: /*
55: * Virtual memory related constants, all in bytes
56: */
57: #ifndef MAXTSIZ
58: #define MAXTSIZ (64*1024*1024) /* max text size */
59: #endif
60: #ifndef DFLDSIZ
61: #define DFLDSIZ (128*1024*1024) /* initial data size limit */
62: #endif
63: #ifndef MAXDSIZ
64: #define MAXDSIZ (1*1024*1024*1024) /* max data size */
65: #endif
66: #ifndef DFLSSIZ
67: #define DFLSSIZ (2*1024*1024) /* initial stack size limit */
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 phyio operations.
77: * 16 pte's are enough to cover 8 disks * MAXBSIZE.
78: */
79: #ifndef USRIOSIZE
80: #define USRIOSIZE 32
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 8192 /* 8mb */
89: #endif
90:
91: #define VM_PHYSSEG_MAX 8 /* Max number of physical memory segments */
92: #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
93: #define VM_PHYSSEG_NOADD
94:
95: /* user/kernel map constants */
96: #define VM_MIN_ADDRESS ((vaddr_t)0x0000000000000000L)
97: #define VM_MAXUSER_ADDRESS ((vaddr_t)0x0000000080000000L)
98: #define VM_MAX_ADDRESS ((vaddr_t)0x0000000080000000L)
99: #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xffffffffc0000000L)
100: #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xfffffffffffff000L)
101:
102: #define VM_NFREELIST 1
103: #define VM_FREELIST_DEFAULT 0
104:
105: /* virtual sizes (bytes) for various kernel submaps */
106: #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
107:
108: #if defined(_KERNEL) && !defined(_LOCORE)
109: /*
110: * pmap-specific data
111: */
112:
113: /* XXX - belongs in pmap.h, but put here because of ordering issues */
114: typedef struct pv_entry {
115: struct pv_entry *pv_next; /* next pv_entry */
116: struct pmap *pv_pmap; /* pmap where mapping lies */
117: vaddr_t pv_va; /* virtual address for mapping */
118: } *pv_entry_t;
119:
120: #define __HAVE_VM_PAGE_MD
121: struct vm_page_md {
122: struct pv_entry pv_ent; /* pv list of this seg */
123: };
124:
125: #define VM_MDPAGE_INIT(pg) \
126: do { \
127: (pg)->mdpage.pv_ent.pv_next = NULL; \
128: (pg)->mdpage.pv_ent.pv_pmap = NULL; \
129: (pg)->mdpage.pv_ent.pv_va = 0; \
130: } while (0)
131:
132: #endif /* _KERNEL && !_LOCORE */
133:
134: #endif /* !_MIPS_VMPARAM_H_ */
CVSweb