param.h revision 1.5
11.5Ssimonb/*	$NetBSD: param.h,v 1.5 2008/01/08 14:38:48 simonb Exp $	*/
21.1Ssimonb
31.1Ssimonb/*
41.1Ssimonb * Copyright (c) 1992, 1993
51.1Ssimonb *	The Regents of the University of California.  All rights reserved.
61.3Sagc *
71.3Sagc * This code is derived from software contributed to Berkeley by
81.3Sagc * the Systems Programming Group of the University of Utah Computer
91.3Sagc * Science Department and Ralph Campbell.
101.3Sagc *
111.3Sagc * Redistribution and use in source and binary forms, with or without
121.3Sagc * modification, are permitted provided that the following conditions
131.3Sagc * are met:
141.3Sagc * 1. Redistributions of source code must retain the above copyright
151.3Sagc *    notice, this list of conditions and the following disclaimer.
161.3Sagc * 2. Redistributions in binary form must reproduce the above copyright
171.3Sagc *    notice, this list of conditions and the following disclaimer in the
181.3Sagc *    documentation and/or other materials provided with the distribution.
191.3Sagc * 3. Neither the name of the University nor the names of its contributors
201.3Sagc *    may be used to endorse or promote products derived from this software
211.3Sagc *    without specific prior written permission.
221.3Sagc *
231.3Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
241.3Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251.3Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261.3Sagc * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
271.3Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281.3Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291.3Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.3Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.3Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.3Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.3Sagc * SUCH DAMAGE.
341.3Sagc */
351.3Sagc/*
361.3Sagc * Copyright (c) 1988 University of Utah.
371.1Ssimonb *
381.1Ssimonb * This code is derived from software contributed to Berkeley by
391.1Ssimonb * the Systems Programming Group of the University of Utah Computer
401.1Ssimonb * Science Department and Ralph Campbell.
411.1Ssimonb *
421.1Ssimonb * Redistribution and use in source and binary forms, with or without
431.1Ssimonb * modification, are permitted provided that the following conditions
441.1Ssimonb * are met:
451.1Ssimonb * 1. Redistributions of source code must retain the above copyright
461.1Ssimonb *    notice, this list of conditions and the following disclaimer.
471.1Ssimonb * 2. Redistributions in binary form must reproduce the above copyright
481.1Ssimonb *    notice, this list of conditions and the following disclaimer in the
491.1Ssimonb *    documentation and/or other materials provided with the distribution.
501.1Ssimonb * 3. All advertising materials mentioning features or use of this software
511.1Ssimonb *    must display the following acknowledgement:
521.1Ssimonb *	This product includes software developed by the University of
531.1Ssimonb *	California, Berkeley and its contributors.
541.1Ssimonb * 4. Neither the name of the University nor the names of its contributors
551.1Ssimonb *    may be used to endorse or promote products derived from this software
561.1Ssimonb *    without specific prior written permission.
571.1Ssimonb *
581.1Ssimonb * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
591.1Ssimonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
601.1Ssimonb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
611.1Ssimonb * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
621.1Ssimonb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
631.1Ssimonb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
641.1Ssimonb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
651.1Ssimonb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
661.1Ssimonb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
671.1Ssimonb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
681.1Ssimonb * SUCH DAMAGE.
691.1Ssimonb */
701.1Ssimonb
711.1Ssimonb#ifndef _SBMIPS_PARAM_H_
721.1Ssimonb#define _SBMIPS_PARAM_H_
731.1Ssimonb
741.1Ssimonb/*
751.1Ssimonb * Machine-dependent constants (VM, etc) common across MIPS cpus
761.1Ssimonb */
771.1Ssimonb
781.1Ssimonb#include <mips/mips_param.h>
791.1Ssimonb
801.1Ssimonb/*
811.1Ssimonb * Machine dependent constants for Broadcom/Sibyte boards.
821.1Ssimonb */
831.1Ssimonb
841.1Ssimonb#if defined(__MIPSEB__)
851.1Ssimonb#define	_MACHINE_ARCH	mipseb
861.1Ssimonb#define	MACHINE_ARCH	"mipseb"
871.1Ssimonb#elif defined(__MIPSEL__)
881.1Ssimonb#define	_MACHINE_ARCH	mipsel
891.1Ssimonb#define	MACHINE_ARCH	"mipsel"
901.1Ssimonb#else
911.1Ssimonb#error neither __MIPSEL__ nor __MIPSEB__ are defined.
921.1Ssimonb#endif
931.1Ssimonb
941.1Ssimonb#define	_MACHINE	sbmips
951.1Ssimonb#define	MACHINE		"sbmips"
961.1Ssimonb#define	MID_MACHINE	MID_PMAX	/* XXX Bogus, but needed for now... */
971.1Ssimonb
981.1Ssimonb#define	DEV_BSIZE	512
991.1Ssimonb#define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
1001.1Ssimonb#define	BLKDEV_IOSIZE	2048
1011.1Ssimonb#define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */
1021.1Ssimonb
1031.1Ssimonb/*
1041.1Ssimonb * Constants related to network buffer management.
1051.1Ssimonb * MCLBYTES must be no larger than NBPG (the software page size), and,
1061.1Ssimonb * on machines that exchange pages of input or output buffers with mbuf
1071.1Ssimonb * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
1081.1Ssimonb * of the hardware page size.
1091.1Ssimonb */
1101.1Ssimonb#define	MSIZE		256		/* size of an mbuf */
1111.1Ssimonb
1121.1Ssimonb#ifndef MCLSHIFT
1131.1Ssimonb# define MCLSHIFT	11		/* convert bytes to m_buf clusters */
1141.1Ssimonb#endif	/* MCLSHIFT */
1151.1Ssimonb
1161.1Ssimonb#define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
1171.1Ssimonb
1181.1Ssimonb#ifndef NMBCLUSTERS
1191.1Ssimonb#if defined(_KERNEL_OPT)
1201.1Ssimonb#include "opt_gateway.h"
1211.1Ssimonb#endif
1221.1Ssimonb
1231.1Ssimonb#ifdef GATEWAY
1241.1Ssimonb#define	NMBCLUSTERS	2048		/* map size, max cluster allocation */
1251.1Ssimonb#else
1261.1Ssimonb#define	NMBCLUSTERS	1024		/* map size, max cluster allocation */
1271.1Ssimonb#endif
1281.1Ssimonb#endif
1291.1Ssimonb
1301.1Ssimonb#ifdef _KERNEL
1311.1Ssimonb#ifndef _LOCORE
1321.1Ssimonb
1331.5Ssimonbvoid	delay(int n);
1341.5Ssimonb#define	DELAY(x)	 delay(x)
1351.5Ssimonb
1361.1Ssimonb#include <machine/systemsw.h>
1371.1Ssimonb#include <machine/intr.h>
1381.1Ssimonb
1391.1Ssimonb#endif	/* _LOCORE */
1401.1Ssimonb#endif	/* _KERNEL */
1411.1Ssimonb
1421.1Ssimonb#endif	/* !_SBMIPS_PARAM_H_ */
143