param.h revision 1.5
11.5Sagc/* $NetBSD: param.h,v 1.5 2003/08/07 16:26:31 agc Exp $ */ 21.1Sthorpej 31.1Sthorpej/* 41.1Sthorpej * Copyright (c) 1992, 1993 51.1Sthorpej * The Regents of the University of California. All rights reserved. 61.5Sagc * 71.5Sagc * This code is derived from software contributed to Berkeley by 81.5Sagc * the Systems Programming Group of the University of Utah Computer 91.5Sagc * Science Department and Ralph Campbell. 101.5Sagc * 111.5Sagc * Redistribution and use in source and binary forms, with or without 121.5Sagc * modification, are permitted provided that the following conditions 131.5Sagc * are met: 141.5Sagc * 1. Redistributions of source code must retain the above copyright 151.5Sagc * notice, this list of conditions and the following disclaimer. 161.5Sagc * 2. Redistributions in binary form must reproduce the above copyright 171.5Sagc * notice, this list of conditions and the following disclaimer in the 181.5Sagc * documentation and/or other materials provided with the distribution. 191.5Sagc * 3. Neither the name of the University nor the names of its contributors 201.5Sagc * may be used to endorse or promote products derived from this software 211.5Sagc * without specific prior written permission. 221.5Sagc * 231.5Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.5Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.5Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.5Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.5Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.5Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.5Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.5Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.5Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.5Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.5Sagc * SUCH DAMAGE. 341.5Sagc * 351.5Sagc * from: Utah Hdr: machparam.h 1.11 89/08/14 361.5Sagc * 371.5Sagc * @(#)param.h 8.1 (Berkeley) 6/10/93 381.5Sagc */ 391.5Sagc/* 401.5Sagc * Copyright (c) 1988 University of Utah. 411.1Sthorpej * 421.1Sthorpej * This code is derived from software contributed to Berkeley by 431.1Sthorpej * the Systems Programming Group of the University of Utah Computer 441.1Sthorpej * Science Department and Ralph Campbell. 451.1Sthorpej * 461.1Sthorpej * Redistribution and use in source and binary forms, with or without 471.1Sthorpej * modification, are permitted provided that the following conditions 481.1Sthorpej * are met: 491.1Sthorpej * 1. Redistributions of source code must retain the above copyright 501.1Sthorpej * notice, this list of conditions and the following disclaimer. 511.1Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 521.1Sthorpej * notice, this list of conditions and the following disclaimer in the 531.1Sthorpej * documentation and/or other materials provided with the distribution. 541.1Sthorpej * 3. All advertising materials mentioning features or use of this software 551.1Sthorpej * must display the following acknowledgement: 561.1Sthorpej * This product includes software developed by the University of 571.1Sthorpej * California, Berkeley and its contributors. 581.1Sthorpej * 4. Neither the name of the University nor the names of its contributors 591.1Sthorpej * may be used to endorse or promote products derived from this software 601.1Sthorpej * without specific prior written permission. 611.1Sthorpej * 621.1Sthorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 631.1Sthorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 641.1Sthorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 651.1Sthorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 661.1Sthorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 671.1Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 681.1Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 691.1Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 701.1Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 711.1Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 721.1Sthorpej * SUCH DAMAGE. 731.1Sthorpej * 741.1Sthorpej * from: Utah Hdr: machparam.h 1.11 89/08/14 751.1Sthorpej * 761.1Sthorpej * @(#)param.h 8.1 (Berkeley) 6/10/93 771.1Sthorpej */ 781.1Sthorpej 791.1Sthorpej#ifndef _ALGOR_PARAM_H_ 801.1Sthorpej#define _ALGOR_PARAM_H_ 811.1Sthorpej 821.1Sthorpej/* 831.1Sthorpej * Machine-dependent constants (VM, etc) common across MIPS cpus 841.1Sthorpej */ 851.1Sthorpej 861.1Sthorpej#include <mips/mips_param.h> 871.1Sthorpej 881.1Sthorpej/* 891.3Ssimonb * Machine dependent constants for Algorithmics boards. 901.1Sthorpej */ 911.1Sthorpej 921.1Sthorpej#define _MACHINE_ARCH mipsel 931.1Sthorpej#define MACHINE_ARCH "mipsel" 941.1Sthorpej#define _MACHINE algor 951.1Sthorpej#define MACHINE "algor" 961.1Sthorpej#define MID_MACHINE MID_PMAX /* XXX Bogus, but needed for now... */ 971.1Sthorpej 981.1Sthorpej#define DEV_BSIZE 512 991.1Sthorpej#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 1001.1Sthorpej#define BLKDEV_IOSIZE 2048 1011.1Sthorpej#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */ 1021.1Sthorpej 1031.1Sthorpej/* 1041.1Sthorpej * Constants related to network buffer management. 1051.1Sthorpej * MCLBYTES must be no larger than NBPG (the software page size), and, 1061.1Sthorpej * on machines that exchange pages of input or output buffers with mbuf 1071.1Sthorpej * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple 1081.1Sthorpej * of the hardware page size. 1091.1Sthorpej */ 1101.1Sthorpej#define MSIZE 256 /* size of an mbuf */ 1111.1Sthorpej 1121.1Sthorpej#ifndef MCLSHIFT 1131.4Ssimonb#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ 1141.4Ssimonb /* 2K cluster can hold Ether frame */ 1151.1Sthorpej#endif /* MCLSHIFT */ 1161.1Sthorpej 1171.1Sthorpej#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ 1181.1Sthorpej 1191.4Ssimonb#ifndef NMBCLUSTERS 1201.2Smrg#if defined(_KERNEL_OPT) 1211.1Sthorpej#include "opt_gateway.h" 1221.2Smrg#endif 1231.1Sthorpej 1241.1Sthorpej#ifdef GATEWAY 1251.1Sthorpej#define NMBCLUSTERS 2048 /* map size, max cluster allocation */ 1261.1Sthorpej#else 1271.1Sthorpej#define NMBCLUSTERS 1024 /* map size, max cluster allocation */ 1281.1Sthorpej#endif 1291.1Sthorpej#endif 1301.1Sthorpej 1311.1Sthorpej#ifdef _KERNEL 1321.1Sthorpej#ifndef _LOCORE 1331.1Sthorpej 1341.1Sthorpejvoid delay __P((int n)); 1351.1Sthorpejextern int cpuspeed; 1361.1Sthorpej#define DELAY(n) { int N = cpuspeed * (n); while (--N > 0); } 1371.1Sthorpej 1381.1Sthorpej#include <machine/intr.h> 1391.1Sthorpej 1401.1Sthorpej#endif /* !_LOCORE */ 1411.1Sthorpej#endif /* _KERNEL */ 1421.1Sthorpej 1431.1Sthorpej#endif /* !_ALGOR_PARAM_H_ */ 144