param.h revision 1.10 1 1.10 ad /* $NetBSD: param.h,v 1.10 2008/07/02 17:28:57 ad Exp $ */
2 1.1 fredette
3 1.1 fredette /*
4 1.1 fredette * Copyright (c) 1982, 1986, 1990, 1993
5 1.1 fredette * The Regents of the University of California. All rights reserved.
6 1.4 agc *
7 1.4 agc * This code is derived from software contributed to Berkeley by
8 1.4 agc * the Systems Programming Group of the University of Utah Computer
9 1.4 agc * Science Department.
10 1.4 agc *
11 1.4 agc * Redistribution and use in source and binary forms, with or without
12 1.4 agc * modification, are permitted provided that the following conditions
13 1.4 agc * are met:
14 1.4 agc * 1. Redistributions of source code must retain the above copyright
15 1.4 agc * notice, this list of conditions and the following disclaimer.
16 1.4 agc * 2. Redistributions in binary form must reproduce the above copyright
17 1.4 agc * notice, this list of conditions and the following disclaimer in the
18 1.4 agc * documentation and/or other materials provided with the distribution.
19 1.4 agc * 3. Neither the name of the University nor the names of its contributors
20 1.4 agc * may be used to endorse or promote products derived from this software
21 1.4 agc * without specific prior written permission.
22 1.4 agc *
23 1.4 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.4 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.4 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.4 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.4 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.4 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.4 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.4 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.4 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.4 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.4 agc * SUCH DAMAGE.
34 1.4 agc *
35 1.4 agc * from: Utah Hdr: machparam.h 1.16 92/12/20
36 1.4 agc * from: @(#)param.h 8.1 (Berkeley) 6/10/93
37 1.4 agc */
38 1.4 agc /*
39 1.4 agc * Copyright (c) 1988 University of Utah.
40 1.1 fredette *
41 1.1 fredette * This code is derived from software contributed to Berkeley by
42 1.1 fredette * the Systems Programming Group of the University of Utah Computer
43 1.1 fredette * Science Department.
44 1.1 fredette *
45 1.1 fredette * Redistribution and use in source and binary forms, with or without
46 1.1 fredette * modification, are permitted provided that the following conditions
47 1.1 fredette * are met:
48 1.1 fredette * 1. Redistributions of source code must retain the above copyright
49 1.1 fredette * notice, this list of conditions and the following disclaimer.
50 1.1 fredette * 2. Redistributions in binary form must reproduce the above copyright
51 1.1 fredette * notice, this list of conditions and the following disclaimer in the
52 1.1 fredette * documentation and/or other materials provided with the distribution.
53 1.1 fredette * 3. All advertising materials mentioning features or use of this software
54 1.1 fredette * must display the following acknowledgement:
55 1.1 fredette * This product includes software developed by the University of
56 1.1 fredette * California, Berkeley and its contributors.
57 1.1 fredette * 4. Neither the name of the University nor the names of its contributors
58 1.1 fredette * may be used to endorse or promote products derived from this software
59 1.1 fredette * without specific prior written permission.
60 1.1 fredette *
61 1.1 fredette * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
62 1.1 fredette * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
63 1.1 fredette * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
64 1.1 fredette * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
65 1.1 fredette * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
66 1.1 fredette * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
67 1.1 fredette * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
68 1.1 fredette * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
69 1.1 fredette * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
70 1.1 fredette * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
71 1.1 fredette * SUCH DAMAGE.
72 1.1 fredette *
73 1.1 fredette * from: Utah Hdr: machparam.h 1.16 92/12/20
74 1.1 fredette * from: @(#)param.h 8.1 (Berkeley) 6/10/93
75 1.1 fredette */
76 1.1 fredette
77 1.1 fredette #ifndef _MACHINE_PARAM_H_
78 1.1 fredette #define _MACHINE_PARAM_H_
79 1.1 fredette
80 1.1 fredette /*
81 1.1 fredette * Machine dependent constants for the Sun2 series.
82 1.1 fredette */
83 1.1 fredette #define _MACHINE sun2
84 1.1 fredette #define MACHINE "sun2"
85 1.1 fredette #define _MACHINE_ARCH m68000
86 1.1 fredette #define MACHINE_ARCH "m68000"
87 1.1 fredette #define MID_MACHINE MID_M680002K
88 1.1 fredette
89 1.3 fredette #define PGSHIFT 11 /* LOG2(NBPG) */
90 1.3 fredette
91 1.1 fredette #ifdef MSGBUFSIZE
92 1.1 fredette #error "MSGBUFSIZE is not user-adjustable for this arch"
93 1.1 fredette #endif
94 1.3 fredette #define MSGBUFOFF 0x0
95 1.3 fredette #define MSGBUFSIZE ((NBPG * 4) - MSGBUFOFF)
96 1.1 fredette
97 1.1 fredette /* This is needed by ps (actually USPACE). */
98 1.1 fredette #define UPAGES (16384 / NBPG) /* pages of u-area */
99 1.1 fredette
100 1.1 fredette #if defined(_KERNEL) || defined(_STANDALONE)
101 1.1 fredette
102 1.3 fredette #define KERNBASE 0x00006000 /* start of kernel virtual */
103 1.1 fredette #define KERN_END 0x00E00000 /* end of kernel virtual */
104 1.1 fredette
105 1.1 fredette #define SEGSHIFT 15 /* LOG2(NBSG) */
106 1.1 fredette #define NBSG (1 << SEGSHIFT) /* bytes/segment */
107 1.1 fredette #define SEGOFSET (NBSG-1) /* byte offset into segment */
108 1.1 fredette
109 1.9 tsutsui #define MAXBSIZE 0x4000 /* max FS block size */
110 1.5 mycroft #define MAXPHYS 0xe000
111 1.1 fredette
112 1.1 fredette /*
113 1.1 fredette * XXX fredette - we force a small number of mbuf clusters and cluster
114 1.1 fredette * size to help me debug this on my low-memory machine. These should
115 1.1 fredette * go away at some point.
116 1.1 fredette */
117 1.1 fredette #define NMBCLUSTERS 64 /* map size, max cluster allocation */
118 1.1 fredette #define MCLSHIFT 10
119 1.2 fredette
120 1.2 fredette /*
121 1.2 fredette * XXX fredette - we must define this, otw UBC consumes 8MB of kernel VM.
122 1.2 fredette * For now, we make it absurdly small, perhaps it can grow later.
123 1.2 fredette */
124 1.2 fredette #define UBC_NWINS 32
125 1.1 fredette
126 1.10 ad #define MAXEXEC 1
127 1.10 ad
128 1.1 fredette #endif /* _KERNEL */
129 1.1 fredette
130 1.1 fredette #include <m68k/param.h>
131 1.1 fredette
132 1.1 fredette /*
133 1.1 fredette * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
134 1.1 fredette * logical pages.
135 1.1 fredette */
136 1.1 fredette #define NKMEMPAGES_MIN_DEFAULT ((3 * 1024 * 1024) >> PAGE_SHIFT)
137 1.1 fredette #define NKMEMPAGES_MAX_DEFAULT ((3 * 1024 * 1024) >> PAGE_SHIFT)
138 1.1 fredette
139 1.1 fredette #if defined(_KERNEL) && !defined(_LOCORE)
140 1.1 fredette
141 1.7 chs #include <machine/intr.h>
142 1.1 fredette
143 1.6 chs extern void _delay(unsigned);
144 1.1 fredette #define delay(us) _delay((us)<<8)
145 1.1 fredette #define DELAY(n) delay(n)
146 1.1 fredette
147 1.1 fredette #endif /* _KERNEL && !_LOCORE */
148 1.1 fredette #endif /* !_MACHINE_PARAM_H_ */
149