param.h revision 1.22
11.22Sscw/*	$NetBSD: param.h,v 1.22 2000/11/20 19:35:29 scw Exp $	*/
21.1Schuck
31.1Schuck/*
41.1Schuck * Copyright (c) 1988 University of Utah.
51.1Schuck * Copyright (c) 1982, 1986, 1990, 1993
61.1Schuck *	The Regents of the University of California.  All rights reserved.
71.1Schuck *
81.1Schuck * This code is derived from software contributed to Berkeley by
91.1Schuck * the Systems Programming Group of the University of Utah Computer
101.1Schuck * Science Department.
111.1Schuck *
121.1Schuck * Redistribution and use in source and binary forms, with or without
131.1Schuck * modification, are permitted provided that the following conditions
141.1Schuck * are met:
151.1Schuck * 1. Redistributions of source code must retain the above copyright
161.1Schuck *    notice, this list of conditions and the following disclaimer.
171.1Schuck * 2. Redistributions in binary form must reproduce the above copyright
181.1Schuck *    notice, this list of conditions and the following disclaimer in the
191.1Schuck *    documentation and/or other materials provided with the distribution.
201.1Schuck * 3. All advertising materials mentioning features or use of this software
211.1Schuck *    must display the following acknowledgement:
221.1Schuck *	This product includes software developed by the University of
231.1Schuck *	California, Berkeley and its contributors.
241.1Schuck * 4. Neither the name of the University nor the names of its contributors
251.1Schuck *    may be used to endorse or promote products derived from this software
261.1Schuck *    without specific prior written permission.
271.1Schuck *
281.1Schuck * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
291.1Schuck * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
301.1Schuck * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
311.1Schuck * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
321.1Schuck * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
331.1Schuck * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
341.1Schuck * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
351.1Schuck * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
361.1Schuck * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
371.1Schuck * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
381.1Schuck * SUCH DAMAGE.
391.1Schuck *
401.1Schuck * from: Utah $Hdr: machparam.h 1.16 92/12/20$
411.1Schuck *
421.1Schuck *	@(#)param.h	8.1 (Berkeley) 6/10/93
431.1Schuck */
441.1Schuck
451.8Sveego#ifndef	_MACHINE_PARAM_H_
461.8Sveego#define	_MACHINE_PARAM_H_
471.8Sveego
481.1Schuck/*
491.1Schuck * Machine dependent constants for mvme68k, based on HP9000 series 300.
501.1Schuck */
511.5Scgd#define	_MACHINE 	mvme68k
521.4Scgd#define	MACHINE		"mvme68k"
531.1Schuck
541.20Sscw/*
551.20Sscw * Grab the interrupt definitions
561.20Sscw */
571.20Sscw#include <machine/intr.h>
581.20Sscw
591.8Sveego#define	PGSHIFT		12		/* LOG2(NBPG) */
601.8Sveego#define	KERNBASE	0x00000000	/* start of kernel virtual */
611.8Sveego
621.9Sveego#define	SEGSHIFT	22		/* LOG2(NBSEG) */
631.21Sscw#if defined(M68030) && !defined(M68040) && !defined(M68060)
641.9Sveego#define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
651.21Sscw#else
661.21Sscw#define	NBSEG		((mmutype == MMU_68040) ? \
671.21Sscw				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
681.21Sscw#endif
691.9Sveego#define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
701.9Sveego
711.8Sveego#define	UPAGES		3		/* pages of u-area */
721.1Schuck
731.8Sveego#include <m68k/param.h>
741.10Sveego
751.10Sveego#define	NPTEPG		(NBPG/(sizeof (pt_entry_t)))
761.1Schuck
771.1Schuck/*
781.19Sthorpej * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
791.19Sthorpej * logical pages.
801.1Schuck */
811.19Sthorpej#define	NKMEMPAGES_MIN_DEFAULT	((4 * 1024 * 1024) >> PAGE_SHIFT)
821.19Sthorpej#define	NKMEMPAGES_MAX_DEFAULT	((6 * 1024 * 1024) >> PAGE_SHIFT)
831.1Schuck
841.20Sscw#if defined(_KERNEL) && !defined(_LOCORE)
851.6Schuckextern void _delay __P((unsigned));
861.22Sscw#define delay(us)	_delay((us)<<10)
871.6Schuck#define DELAY(n)	delay(n)
881.20Sscw#endif	/* _KERNEL && !_LOCORE */
891.8Sveego
901.8Sveego#endif	/* !_MACHINE_PARAM_H_ */
91