11.4Sjdolecek/* $NetBSD: param.h,v 1.4 2019/01/07 22:00:31 jdolecek 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/* 541.1Spooka * Constants related to network buffer management. 551.1Spooka * MCLBYTES must be no larger than NBPG (the software page size), and, 561.1Spooka * on machines that exchange pages of input or output buffers with mbuf 571.1Spooka * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple 581.1Spooka * of the hardware page size. 591.1Spooka */ 601.1Spooka#define MSIZE 256 /* size of an mbuf */ 611.1Spooka 621.1Spooka#ifndef MCLSHIFT 631.1Spooka#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ 641.1Spooka /* 2K cluster can hold Ether frame */ 651.1Spooka#endif /* MCLSHIFT */ 661.1Spooka 671.1Spooka#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ 681.1Spooka 691.1Spooka#ifndef NMBCLUSTERS 701.1Spooka#if defined(_KERNEL_OPT) 711.1Spooka#include "opt_gateway.h" 721.1Spooka#endif 731.1Spooka 741.1Spooka#ifdef GATEWAY 751.1Spooka#define NMBCLUSTERS 2048 /* map size, max cluster allocation */ 761.1Spooka#else 771.1Spooka#define NMBCLUSTERS 1024 /* map size, max cluster allocation */ 781.1Spooka#endif 791.1Spooka#endif 801.1Spooka 811.1Spooka#ifdef _KERNEL 821.1Spooka#ifndef _LOCORE 831.1Spooka 841.1Spookavoid delay __P((int n)); 851.1Spookaextern int cpuspeed; 861.1Spookastatic __inline void __attribute__((__unused__)) 871.1SpookaDELAY(int n) 881.1Spooka{ 891.1Spooka register int __N = cpuspeed * n; 901.1Spooka 911.1Spooka do { 921.1Spooka __asm("addiu %0,%1,-1" : "=r" (__N) : "0" (__N)); 931.1Spooka } while (__N > 0); 941.1Spooka} 951.1Spooka 961.1Spooka#include <machine/intr.h> 971.1Spooka 981.1Spooka#endif /* !_LOCORE */ 991.1Spooka#endif /* _KERNEL */ 1001.1Spooka 1011.1Spooka#endif /* !_EMIPS_PARAM_H_ */ 102