param.h revision 1.1
11.1Stsutsui/* $NetBSD: param.h,v 1.1 2005/12/29 15:20:08 tsutsui Exp $ */ 21.1Stsutsui 31.1Stsutsui/* 41.1Stsutsui * Copyright (c) 1992, 1993 51.1Stsutsui * The Regents of the University of California. All rights reserved. 61.1Stsutsui * 71.1Stsutsui * This code is derived from software contributed to Berkeley by 81.1Stsutsui * the Systems Programming Group of the University of Utah Computer 91.1Stsutsui * Science Department and Ralph Campbell. 101.1Stsutsui * 111.1Stsutsui * Redistribution and use in source and binary forms, with or without 121.1Stsutsui * modification, are permitted provided that the following conditions 131.1Stsutsui * are met: 141.1Stsutsui * 1. Redistributions of source code must retain the above copyright 151.1Stsutsui * notice, this list of conditions and the following disclaimer. 161.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 171.1Stsutsui * notice, this list of conditions and the following disclaimer in the 181.1Stsutsui * documentation and/or other materials provided with the distribution. 191.1Stsutsui * 3. Neither the name of the University nor the names of its contributors 201.1Stsutsui * may be used to endorse or promote products derived from this software 211.1Stsutsui * without specific prior written permission. 221.1Stsutsui * 231.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.1Stsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.1Stsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.1Stsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.1Stsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.1Stsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.1Stsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.1Stsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.1Stsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.1Stsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.1Stsutsui * SUCH DAMAGE. 341.1Stsutsui */ 351.1Stsutsui/* 361.1Stsutsui * Copyright (c) 1988 University of Utah. 371.1Stsutsui * 381.1Stsutsui * This code is derived from software contributed to Berkeley by 391.1Stsutsui * the Systems Programming Group of the University of Utah Computer 401.1Stsutsui * Science Department and Ralph Campbell. 411.1Stsutsui * 421.1Stsutsui * Redistribution and use in source and binary forms, with or without 431.1Stsutsui * modification, are permitted provided that the following conditions 441.1Stsutsui * are met: 451.1Stsutsui * 1. Redistributions of source code must retain the above copyright 461.1Stsutsui * notice, this list of conditions and the following disclaimer. 471.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 481.1Stsutsui * notice, this list of conditions and the following disclaimer in the 491.1Stsutsui * documentation and/or other materials provided with the distribution. 501.1Stsutsui * 3. All advertising materials mentioning features or use of this software 511.1Stsutsui * must display the following acknowledgement: 521.1Stsutsui * This product includes software developed by the University of 531.1Stsutsui * California, Berkeley and its contributors. 541.1Stsutsui * 4. Neither the name of the University nor the names of its contributors 551.1Stsutsui * may be used to endorse or promote products derived from this software 561.1Stsutsui * without specific prior written permission. 571.1Stsutsui * 581.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 591.1Stsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 601.1Stsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 611.1Stsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 621.1Stsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 631.1Stsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 641.1Stsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 651.1Stsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 661.1Stsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 671.1Stsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 681.1Stsutsui * SUCH DAMAGE. 691.1Stsutsui */ 701.1Stsutsui 711.1Stsutsui#ifndef _EWS4800MIPS_PARAM_H_ 721.1Stsutsui#define _EWS4800MIPS_PARAM_H_ 731.1Stsutsui 741.1Stsutsui#include <mips/mips_param.h> 751.1Stsutsui 761.1Stsutsui#define _MACHINE_ARCH mipseb 771.1Stsutsui#define MACHINE_ARCH "mipseb" 781.1Stsutsui#define _MACHINE ews4800mips 791.1Stsutsui#define MACHINE "ews4800mips" 801.1Stsutsui#define MID_MACHINE MID_MIPS 811.1Stsutsui 821.1Stsutsui#define DEV_BSIZE 512 831.1Stsutsui#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 841.1Stsutsui#define BLKDEV_IOSIZE 2048 851.1Stsutsui#define MAXPHYS (64 * 1024) /* Maximum raw I/O transfer size */ 861.1Stsutsui 871.1Stsutsui/* 881.1Stsutsui * Constants related to network buffer management. 891.1Stsutsui * MCLBYTES must be no larger than NBPG (the software page size), and, 901.1Stsutsui * on machines that exchange pages of input or output buffers with mbuf 911.1Stsutsui * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple 921.1Stsutsui * of the hardware page size. 931.1Stsutsui */ 941.1Stsutsui#define MSIZE 256 /* size of an mbuf */ 951.1Stsutsui 961.1Stsutsui#ifndef MCLSHIFT 971.1Stsutsui#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ 981.1Stsutsui /* 2K cluster can hold Ether frame */ 991.1Stsutsui#endif /* MCLSHIFT */ 1001.1Stsutsui 1011.1Stsutsui#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ 1021.1Stsutsui 1031.1Stsutsui#ifndef NMBCLUSTERS 1041.1Stsutsui#if defined(_KERNEL_OPT) 1051.1Stsutsui#include "opt_gateway.h" 1061.1Stsutsui#endif 1071.1Stsutsui 1081.1Stsutsui#ifdef GATEWAY 1091.1Stsutsui#define NMBCLUSTERS 2048 /* Map size, max cluster allocation */ 1101.1Stsutsui#else 1111.1Stsutsui#define NMBCLUSTERS 1024 /* Map size, max cluster allocation */ 1121.1Stsutsui#endif 1131.1Stsutsui#endif /* !NMBCLUSTERS */ 1141.1Stsutsui 1151.1Stsutsui#ifdef _KERNEL 1161.1Stsutsui#ifndef _LOCORE 1171.1Stsutsui 1181.1Stsutsuiextern void delay(unsigned); 1191.1Stsutsui#define DELAY(n) delay(n) 1201.1Stsutsui 1211.1Stsutsui/* provide spl*() */ 1221.1Stsutsui#include <machine/intr.h> 1231.1Stsutsui 1241.1Stsutsui#endif /* !_LOCORE */ 1251.1Stsutsui#endif /* _KERNEL */ 1261.1Stsutsui 1271.1Stsutsui#endif /* !_EWS4800MIPS_PARAM_H_ */ 128