param.h revision 1.2.8.2 1 1.2.8.2 nathanw /* $NetBSD: param.h,v 1.2.8.2 2002/02/28 04:10:47 nathanw Exp $ */
2 1.2.8.2 nathanw
3 1.2.8.2 nathanw /*
4 1.2.8.2 nathanw * Copyright (c) 1988 University of Utah.
5 1.2.8.2 nathanw * Copyright (c) 1992, 1993
6 1.2.8.2 nathanw * The Regents of the University of California. All rights reserved.
7 1.2.8.2 nathanw *
8 1.2.8.2 nathanw * This code is derived from software contributed to Berkeley by
9 1.2.8.2 nathanw * the Systems Programming Group of the University of Utah Computer
10 1.2.8.2 nathanw * Science Department and Ralph Campbell.
11 1.2.8.2 nathanw *
12 1.2.8.2 nathanw * Redistribution and use in source and binary forms, with or without
13 1.2.8.2 nathanw * modification, are permitted provided that the following conditions
14 1.2.8.2 nathanw * are met:
15 1.2.8.2 nathanw * 1. Redistributions of source code must retain the above copyright
16 1.2.8.2 nathanw * notice, this list of conditions and the following disclaimer.
17 1.2.8.2 nathanw * 2. Redistributions in binary form must reproduce the above copyright
18 1.2.8.2 nathanw * notice, this list of conditions and the following disclaimer in the
19 1.2.8.2 nathanw * documentation and/or other materials provided with the distribution.
20 1.2.8.2 nathanw * 3. All advertising materials mentioning features or use of this software
21 1.2.8.2 nathanw * must display the following acknowledgement:
22 1.2.8.2 nathanw * This product includes software developed by the University of
23 1.2.8.2 nathanw * California, Berkeley and its contributors.
24 1.2.8.2 nathanw * 4. Neither the name of the University nor the names of its contributors
25 1.2.8.2 nathanw * may be used to endorse or promote products derived from this software
26 1.2.8.2 nathanw * without specific prior written permission.
27 1.2.8.2 nathanw *
28 1.2.8.2 nathanw * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 1.2.8.2 nathanw * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 1.2.8.2 nathanw * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 1.2.8.2 nathanw * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 1.2.8.2 nathanw * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 1.2.8.2 nathanw * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 1.2.8.2 nathanw * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 1.2.8.2 nathanw * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 1.2.8.2 nathanw * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 1.2.8.2 nathanw * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 1.2.8.2 nathanw * SUCH DAMAGE.
39 1.2.8.2 nathanw *
40 1.2.8.2 nathanw * from: Utah Hdr: machparam.h 1.11 89/08/14
41 1.2.8.2 nathanw *
42 1.2.8.2 nathanw * @(#)param.h 8.1 (Berkeley) 6/10/93
43 1.2.8.2 nathanw */
44 1.2.8.2 nathanw
45 1.2.8.2 nathanw /*
46 1.2.8.2 nathanw * Machine-dependent constants (VM, etc) common across MIPS cpus
47 1.2.8.2 nathanw */
48 1.2.8.2 nathanw
49 1.2.8.2 nathanw #include <mips/mips_param.h>
50 1.2.8.2 nathanw
51 1.2.8.2 nathanw /*
52 1.2.8.2 nathanw * Machine dependent constants for Mips Corp. machines
53 1.2.8.2 nathanw */
54 1.2.8.2 nathanw
55 1.2.8.2 nathanw #define _MACHINE_ARCH mipseb
56 1.2.8.2 nathanw #define MACHINE_ARCH "mipseb"
57 1.2.8.2 nathanw #define _MACHINE mipsco
58 1.2.8.2 nathanw #define MACHINE "mipsco"
59 1.2.8.2 nathanw #define MID_MACHINE MID_MIPS
60 1.2.8.2 nathanw
61 1.2.8.2 nathanw #define KERNBASE 0x80000000 /* start of kernel virtual */
62 1.2.8.2 nathanw #define KERNTEXTOFF 0x80001000 /* start of kernel text for kvm_mkdb */
63 1.2.8.2 nathanw #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
64 1.2.8.2 nathanw
65 1.2.8.2 nathanw #define DEV_BSIZE 512
66 1.2.8.2 nathanw #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
67 1.2.8.2 nathanw #define BLKDEV_IOSIZE 2048
68 1.2.8.2 nathanw #define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
69 1.2.8.2 nathanw
70 1.2.8.2 nathanw /*
71 1.2.8.2 nathanw * Constants related to network buffer management.
72 1.2.8.2 nathanw * MCLBYTES must be no larger than NBPG (the software page size), and,
73 1.2.8.2 nathanw * on machines that exchange pages of input or output buffers with mbuf
74 1.2.8.2 nathanw * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
75 1.2.8.2 nathanw * of the hardware page size.
76 1.2.8.2 nathanw */
77 1.2.8.2 nathanw #define MSIZE 256 /* size of an mbuf */
78 1.2.8.2 nathanw
79 1.2.8.2 nathanw #ifndef MCLSHIFT
80 1.2.8.2 nathanw #define MCLSHIFT 11 /* convert bytes to m_buf clusters */
81 1.2.8.2 nathanw /* 2K cluster can hold Ether frame */
82 1.2.8.2 nathanw #endif /* MCLSHIFT */
83 1.2.8.2 nathanw
84 1.2.8.2 nathanw #define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
85 1.2.8.2 nathanw
86 1.2.8.2 nathanw #ifndef NMBCLUSTERS
87 1.2.8.2 nathanw #if defined(_KERNEL_OPT)
88 1.2.8.2 nathanw #include "opt_gateway.h"
89 1.2.8.2 nathanw #endif
90 1.2.8.2 nathanw
91 1.2.8.2 nathanw #ifdef GATEWAY
92 1.2.8.2 nathanw #define NMBCLUSTERS 2048 /* map size, max cluster allocation */
93 1.2.8.2 nathanw #else
94 1.2.8.2 nathanw #define NMBCLUSTERS 1024 /* map size, max cluster allocation */
95 1.2.8.2 nathanw #endif
96 1.2.8.2 nathanw #endif
97 1.2.8.2 nathanw
98 1.2.8.2 nathanw #include <machine/intr.h>
99 1.2.8.2 nathanw
100 1.2.8.2 nathanw #ifdef _KERNEL
101 1.2.8.2 nathanw #ifndef _LOCORE
102 1.2.8.2 nathanw
103 1.2.8.2 nathanw extern void delay __P((int n));
104 1.2.8.2 nathanw extern int cpuspeed;
105 1.2.8.2 nathanw #define DELAY(n) { register int N = cpuspeed * (n); while (--N > 0); }
106 1.2.8.2 nathanw
107 1.2.8.2 nathanw #endif /* !_LOCORE */
108 1.2.8.2 nathanw #endif /* _KERNEL */
109