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