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