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