param.h revision 1.2
11.2Srmind/*	$NetBSD: param.h,v 1.2 2011/02/08 20:20:11 rmind 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 (VM, etc) common across MIPS cpus
461.1Spooka */
471.1Spooka
481.1Spooka#include <mips/mips_param.h>
491.1Spooka
501.1Spooka/*
511.1Spooka * Machine dependent constants for mips-based DECstations.
521.1Spooka */
531.1Spooka
541.1Spooka#define	_MACHINE_ARCH	mipseb
551.1Spooka#define	MACHINE_ARCH	"mipseb"
561.1Spooka#define	_MACHINE	emips
571.1Spooka#define	MACHINE		"emips"
581.1Spooka#define	MID_MACHINE	MID_MIPS
591.1Spooka
601.1Spooka#define	DEV_BSIZE	512
611.1Spooka#define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
621.1Spooka#define BLKDEV_IOSIZE	2048
631.1Spooka#define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */
641.1Spooka
651.1Spooka/*
661.1Spooka * Constants related to network buffer management.
671.1Spooka * MCLBYTES must be no larger than NBPG (the software page size), and,
681.1Spooka * on machines that exchange pages of input or output buffers with mbuf
691.1Spooka * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
701.1Spooka * of the hardware page size.
711.1Spooka */
721.1Spooka#define	MSIZE		256		/* size of an mbuf */
731.1Spooka
741.1Spooka#ifndef MCLSHIFT
751.1Spooka#define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
761.1Spooka					/* 2K cluster can hold Ether frame */
771.1Spooka#endif	/* MCLSHIFT */
781.1Spooka
791.1Spooka#define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
801.1Spooka
811.1Spooka#ifndef NMBCLUSTERS
821.1Spooka#if defined(_KERNEL_OPT)
831.1Spooka#include "opt_gateway.h"
841.1Spooka#endif
851.1Spooka
861.1Spooka#ifdef GATEWAY
871.1Spooka#define	NMBCLUSTERS	2048		/* map size, max cluster allocation */
881.1Spooka#else
891.1Spooka#define	NMBCLUSTERS	1024		/* map size, max cluster allocation */
901.1Spooka#endif
911.1Spooka#endif
921.1Spooka
931.1Spooka#ifdef _KERNEL
941.1Spooka#ifndef _LOCORE
951.1Spooka
961.1Spookavoid	delay __P((int n));
971.1Spookaextern	int cpuspeed;
981.1Spookastatic __inline void __attribute__((__unused__))
991.1SpookaDELAY(int n)
1001.1Spooka{
1011.1Spooka	register int __N = cpuspeed * n;
1021.1Spooka
1031.1Spooka	do {
1041.1Spooka		__asm("addiu %0,%1,-1" : "=r" (__N) : "0" (__N));
1051.1Spooka	} while (__N > 0);
1061.1Spooka}
1071.1Spooka
1081.1Spooka#include <machine/intr.h>
1091.1Spooka
1101.1Spooka#endif	/* !_LOCORE */
1111.1Spooka#endif	/* _KERNEL */
1121.1Spooka
1131.1Spooka#endif	/* !_EMIPS_PARAM_H_ */
114