param.h revision 1.4
11.4Sagc/* $NetBSD: param.h,v 1.4 2003/08/07 16:27:22 agc Exp $ */ 21.1Ssimonb 31.1Ssimonb/* 41.1Ssimonb * Copyright (c) 1992, 1993 51.1Ssimonb * The Regents of the University of California. All rights reserved. 61.4Sagc * 71.4Sagc * This code is derived from software contributed to Berkeley by 81.4Sagc * the Systems Programming Group of the University of Utah Computer 91.4Sagc * Science Department and Ralph Campbell. 101.4Sagc * 111.4Sagc * Redistribution and use in source and binary forms, with or without 121.4Sagc * modification, are permitted provided that the following conditions 131.4Sagc * are met: 141.4Sagc * 1. Redistributions of source code must retain the above copyright 151.4Sagc * notice, this list of conditions and the following disclaimer. 161.4Sagc * 2. Redistributions in binary form must reproduce the above copyright 171.4Sagc * notice, this list of conditions and the following disclaimer in the 181.4Sagc * documentation and/or other materials provided with the distribution. 191.4Sagc * 3. Neither the name of the University nor the names of its contributors 201.4Sagc * may be used to endorse or promote products derived from this software 211.4Sagc * without specific prior written permission. 221.4Sagc * 231.4Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.4Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.4Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.4Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.4Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.4Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.4Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.4Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.4Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.4Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.4Sagc * SUCH DAMAGE. 341.4Sagc */ 351.4Sagc/* 361.4Sagc * Copyright (c) 1988 University of Utah. 371.1Ssimonb * 381.1Ssimonb * This code is derived from software contributed to Berkeley by 391.1Ssimonb * the Systems Programming Group of the University of Utah Computer 401.1Ssimonb * Science Department and Ralph Campbell. 411.1Ssimonb * 421.1Ssimonb * Redistribution and use in source and binary forms, with or without 431.1Ssimonb * modification, are permitted provided that the following conditions 441.1Ssimonb * are met: 451.1Ssimonb * 1. Redistributions of source code must retain the above copyright 461.1Ssimonb * notice, this list of conditions and the following disclaimer. 471.1Ssimonb * 2. Redistributions in binary form must reproduce the above copyright 481.1Ssimonb * notice, this list of conditions and the following disclaimer in the 491.1Ssimonb * documentation and/or other materials provided with the distribution. 501.1Ssimonb * 3. All advertising materials mentioning features or use of this software 511.1Ssimonb * must display the following acknowledgement: 521.1Ssimonb * This product includes software developed by the University of 531.1Ssimonb * California, Berkeley and its contributors. 541.1Ssimonb * 4. Neither the name of the University nor the names of its contributors 551.1Ssimonb * may be used to endorse or promote products derived from this software 561.1Ssimonb * without specific prior written permission. 571.1Ssimonb * 581.1Ssimonb * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 591.1Ssimonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 601.1Ssimonb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 611.1Ssimonb * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 621.1Ssimonb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 631.1Ssimonb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 641.1Ssimonb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 651.1Ssimonb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 661.1Ssimonb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 671.1Ssimonb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 681.1Ssimonb * SUCH DAMAGE. 691.1Ssimonb */ 701.1Ssimonb 711.1Ssimonb#ifndef _EVBMIPS_PARAM_H_ 721.1Ssimonb#define _EVBMIPS_PARAM_H_ 731.1Ssimonb 741.1Ssimonb/* 751.1Ssimonb * Machine-dependent constants (VM, etc) common across MIPS cpus 761.1Ssimonb */ 771.1Ssimonb 781.1Ssimonb#include <mips/mips_param.h> 791.1Ssimonb 801.1Ssimonb/* 811.1Ssimonb * Machine dependent constants for MIPS evaluation boards. 821.1Ssimonb */ 831.1Ssimonb 841.1Ssimonb#if defined(__MIPSEB__) 851.1Ssimonb#define _MACHINE_ARCH mipseb 861.1Ssimonb#define MACHINE_ARCH "mipseb" 871.1Ssimonb#elif defined(__MIPSEL__) 881.1Ssimonb#define _MACHINE_ARCH mipsel 891.1Ssimonb#define MACHINE_ARCH "mipsel" 901.1Ssimonb#else 911.1Ssimonb#error neither __MIPSEL__ nor __MIPSEB__ are defined. 921.1Ssimonb#endif 931.1Ssimonb 941.1Ssimonb#define _MACHINE evbmips 951.1Ssimonb#define MACHINE "evbmips" 961.1Ssimonb#define MID_MACHINE MID_PMAX /* XXX Bogus, but needed for now... */ 971.1Ssimonb 981.1Ssimonb#define DEV_BSIZE 512 991.1Ssimonb#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 1001.1Ssimonb#define BLKDEV_IOSIZE 2048 1011.1Ssimonb#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */ 1021.1Ssimonb 1031.1Ssimonb/* 1041.1Ssimonb * Constants related to network buffer management. 1051.1Ssimonb * MCLBYTES must be no larger than NBPG (the software page size), and, 1061.1Ssimonb * on machines that exchange pages of input or output buffers with mbuf 1071.1Ssimonb * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple 1081.1Ssimonb * of the hardware page size. 1091.1Ssimonb */ 1101.1Ssimonb#define MSIZE 256 /* size of an mbuf */ 1111.1Ssimonb 1121.1Ssimonb#ifndef MCLSHIFT 1131.1Ssimonb# define MCLSHIFT 11 /* convert bytes to m_buf clusters */ 1141.1Ssimonb#endif /* MCLSHIFT */ 1151.1Ssimonb 1161.1Ssimonb#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ 1171.1Ssimonb 1181.1Ssimonb#ifndef NMBCLUSTERS 1191.1Ssimonb#if defined(_KERNEL_OPT) 1201.1Ssimonb#include "opt_gateway.h" 1211.1Ssimonb#endif 1221.1Ssimonb 1231.1Ssimonb#ifdef GATEWAY 1241.1Ssimonb#define NMBCLUSTERS 2048 /* map size, max cluster allocation */ 1251.1Ssimonb#else 1261.1Ssimonb#define NMBCLUSTERS 1024 /* map size, max cluster allocation */ 1271.1Ssimonb#endif 1281.1Ssimonb#endif 1291.1Ssimonb 1301.1Ssimonb#ifdef _KERNEL 1311.1Ssimonb#ifndef _LOCORE 1321.1Ssimonb 1331.1Ssimonbvoid delay(int n); 1341.2Ssimonb#define DELAY delay 1351.1Ssimonb 1361.1Ssimonb#include <machine/intr.h> 1371.1Ssimonb 1381.1Ssimonb#endif /* !_LOCORE */ 1391.1Ssimonb#endif /* _KERNEL */ 1401.1Ssimonb 1411.1Ssimonb#endif /* !_EVBMIPS_PARAM_H_ */ 142