param.h revision 1.4
11.4Ssimonb/* $NetBSD: param.h,v 1.4 2002/02/26 15:13:19 simonb Exp $ */ 21.1Sthorpej 31.1Sthorpej/* 41.1Sthorpej * Copyright (c) 1988 University of Utah. 51.1Sthorpej * Copyright (c) 1992, 1993 61.1Sthorpej * The Regents of the University of California. All rights reserved. 71.1Sthorpej * 81.1Sthorpej * This code is derived from software contributed to Berkeley by 91.1Sthorpej * the Systems Programming Group of the University of Utah Computer 101.1Sthorpej * Science Department and Ralph Campbell. 111.1Sthorpej * 121.1Sthorpej * Redistribution and use in source and binary forms, with or without 131.1Sthorpej * modification, are permitted provided that the following conditions 141.1Sthorpej * are met: 151.1Sthorpej * 1. Redistributions of source code must retain the above copyright 161.1Sthorpej * notice, this list of conditions and the following disclaimer. 171.1Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 181.1Sthorpej * notice, this list of conditions and the following disclaimer in the 191.1Sthorpej * documentation and/or other materials provided with the distribution. 201.1Sthorpej * 3. All advertising materials mentioning features or use of this software 211.1Sthorpej * must display the following acknowledgement: 221.1Sthorpej * This product includes software developed by the University of 231.1Sthorpej * California, Berkeley and its contributors. 241.1Sthorpej * 4. Neither the name of the University nor the names of its contributors 251.1Sthorpej * may be used to endorse or promote products derived from this software 261.1Sthorpej * without specific prior written permission. 271.1Sthorpej * 281.1Sthorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 291.1Sthorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 301.1Sthorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 311.1Sthorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 321.1Sthorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 331.1Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 341.1Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 351.1Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 361.1Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 371.1Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 381.1Sthorpej * SUCH DAMAGE. 391.1Sthorpej * 401.1Sthorpej * from: Utah Hdr: machparam.h 1.11 89/08/14 411.1Sthorpej * 421.1Sthorpej * @(#)param.h 8.1 (Berkeley) 6/10/93 431.1Sthorpej */ 441.1Sthorpej 451.1Sthorpej#ifndef _ALGOR_PARAM_H_ 461.1Sthorpej#define _ALGOR_PARAM_H_ 471.1Sthorpej 481.1Sthorpej/* 491.1Sthorpej * Machine-dependent constants (VM, etc) common across MIPS cpus 501.1Sthorpej */ 511.1Sthorpej 521.1Sthorpej#include <mips/mips_param.h> 531.1Sthorpej 541.1Sthorpej/* 551.3Ssimonb * Machine dependent constants for Algorithmics boards. 561.1Sthorpej */ 571.1Sthorpej 581.1Sthorpej#define _MACHINE_ARCH mipsel 591.1Sthorpej#define MACHINE_ARCH "mipsel" 601.1Sthorpej#define _MACHINE algor 611.1Sthorpej#define MACHINE "algor" 621.1Sthorpej#define MID_MACHINE MID_PMAX /* XXX Bogus, but needed for now... */ 631.1Sthorpej 641.1Sthorpej#define DEV_BSIZE 512 651.1Sthorpej#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 661.1Sthorpej#define BLKDEV_IOSIZE 2048 671.1Sthorpej#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */ 681.1Sthorpej 691.1Sthorpej/* 701.1Sthorpej * Constants related to network buffer management. 711.1Sthorpej * MCLBYTES must be no larger than NBPG (the software page size), and, 721.1Sthorpej * on machines that exchange pages of input or output buffers with mbuf 731.1Sthorpej * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple 741.1Sthorpej * of the hardware page size. 751.1Sthorpej */ 761.1Sthorpej#define MSIZE 256 /* size of an mbuf */ 771.1Sthorpej 781.1Sthorpej#ifndef MCLSHIFT 791.4Ssimonb#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ 801.4Ssimonb /* 2K cluster can hold Ether frame */ 811.1Sthorpej#endif /* MCLSHIFT */ 821.1Sthorpej 831.1Sthorpej#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ 841.1Sthorpej 851.4Ssimonb#ifndef NMBCLUSTERS 861.2Smrg#if defined(_KERNEL_OPT) 871.1Sthorpej#include "opt_gateway.h" 881.2Smrg#endif 891.1Sthorpej 901.1Sthorpej#ifdef GATEWAY 911.1Sthorpej#define NMBCLUSTERS 2048 /* map size, max cluster allocation */ 921.1Sthorpej#else 931.1Sthorpej#define NMBCLUSTERS 1024 /* map size, max cluster allocation */ 941.1Sthorpej#endif 951.1Sthorpej#endif 961.1Sthorpej 971.1Sthorpej#ifdef _KERNEL 981.1Sthorpej#ifndef _LOCORE 991.1Sthorpej 1001.1Sthorpejvoid delay __P((int n)); 1011.1Sthorpejextern int cpuspeed; 1021.1Sthorpej#define DELAY(n) { int N = cpuspeed * (n); while (--N > 0); } 1031.1Sthorpej 1041.1Sthorpej#include <machine/intr.h> 1051.1Sthorpej 1061.1Sthorpej#endif /* !_LOCORE */ 1071.1Sthorpej#endif /* _KERNEL */ 1081.1Sthorpej 1091.1Sthorpej#endif /* !_ALGOR_PARAM_H_ */ 110