param.h revision 1.31
11.31Sjoerg/*	$NetBSD: param.h,v 1.31 2008/01/03 01:02:04 joerg Exp $	*/
21.1Sleo
31.1Sleo/*
41.1Sleo * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
51.1Sleo * All rights reserved.
61.29Sagc *
71.29Sagc * This code is derived from software contributed to Berkeley by
81.29Sagc * the Systems Programming Group of the University of Utah Computer
91.29Sagc * Science Department.
101.29Sagc *
111.29Sagc * Redistribution and use in source and binary forms, with or without
121.29Sagc * modification, are permitted provided that the following conditions
131.29Sagc * are met:
141.29Sagc * 1. Redistributions of source code must retain the above copyright
151.29Sagc *    notice, this list of conditions and the following disclaimer.
161.29Sagc * 2. Redistributions in binary form must reproduce the above copyright
171.29Sagc *    notice, this list of conditions and the following disclaimer in the
181.29Sagc *    documentation and/or other materials provided with the distribution.
191.29Sagc * 3. Neither the name of the University nor the names of its contributors
201.29Sagc *    may be used to endorse or promote products derived from this software
211.29Sagc *    without specific prior written permission.
221.29Sagc *
231.29Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
241.29Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251.29Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261.29Sagc * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
271.29Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281.29Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291.29Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.29Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.29Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.29Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.29Sagc * SUCH DAMAGE.
341.29Sagc *
351.29Sagc * from: Utah $Hdr: machparam.h 1.11 89/08/14$
361.29Sagc *
371.29Sagc *	@(#)param.h	7.8 (Berkeley) 6/28/91
381.29Sagc */
391.29Sagc/*
401.29Sagc * Copyright (c) 1988 University of Utah.
411.1Sleo *
421.1Sleo * This code is derived from software contributed to Berkeley by
431.1Sleo * the Systems Programming Group of the University of Utah Computer
441.1Sleo * Science Department.
451.1Sleo *
461.1Sleo * Redistribution and use in source and binary forms, with or without
471.1Sleo * modification, are permitted provided that the following conditions
481.1Sleo * are met:
491.1Sleo * 1. Redistributions of source code must retain the above copyright
501.1Sleo *    notice, this list of conditions and the following disclaimer.
511.1Sleo * 2. Redistributions in binary form must reproduce the above copyright
521.1Sleo *    notice, this list of conditions and the following disclaimer in the
531.1Sleo *    documentation and/or other materials provided with the distribution.
541.1Sleo * 3. All advertising materials mentioning features or use of this software
551.1Sleo *    must display the following acknowledgement:
561.1Sleo *	This product includes software developed by the University of
571.1Sleo *	California, Berkeley and its contributors.
581.1Sleo * 4. Neither the name of the University nor the names of its contributors
591.1Sleo *    may be used to endorse or promote products derived from this software
601.1Sleo *    without specific prior written permission.
611.1Sleo *
621.1Sleo * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
631.1Sleo * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
641.1Sleo * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
651.1Sleo * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
661.1Sleo * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
671.1Sleo * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
681.1Sleo * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
691.1Sleo * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
701.1Sleo * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
711.1Sleo * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
721.1Sleo * SUCH DAMAGE.
731.1Sleo *
741.1Sleo * from: Utah $Hdr: machparam.h 1.11 89/08/14$
751.1Sleo *
761.1Sleo *	@(#)param.h	7.8 (Berkeley) 6/28/91
771.1Sleo */
781.1Sleo
791.21Sveego#ifndef	_MACHINE_PARAM_H_
801.21Sveego#define	_MACHINE_PARAM_H_
811.1Sleo
821.1Sleo/*
831.1Sleo * Machine dependent constants for atari
841.1Sleo */
851.13Scgd#define	_MACHINE	atari
861.1Sleo#define	MACHINE		"atari"
871.1Sleo
881.21Sveego#define	PGSHIFT		13		/* LOG2(NBPG) */
891.21Sveego#define	KERNBASE	0x00000000	/* start of kernel virtual */
901.1Sleo
911.6Sleo#define	SEGSHIFT	24		/* LOG2(NBSEG) [68030 value] */
921.22Sveego/* bytes/segment */
931.22Sveego/* (256 * (1 << PGSHIFT)) == (1 << SEGSHIFT) */
941.22Sveego#define	NBSEG		((mmutype == MMU_68040) \
951.22Sveego			    ? (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
961.21Sveego#define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
971.1Sleo
981.23Sveego#define	UPAGES		2		/* pages of u-area */
991.23Sveego
1001.22Sveego#include <m68k/param.h>
1011.23Sveego
1021.23Sveego#define	NPTEPG		(NBPG/(sizeof (pt_entry_t)))
1031.22Sveego
1041.1Sleo/*
1051.27Sthorpej * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
1061.27Sthorpej * logical pages.
1071.1Sleo */
1081.27Sthorpej#define	NKMEMPAGES_MIN_DEFAULT	((3 * 1024 * 1024) >> PAGE_SHIFT)
1091.27Sthorpej#define	NKMEMPAGES_MAX_DEFAULT	((3 * 1024 * 1024) >> PAGE_SHIFT)
1101.1Sleo
1111.28Sleo#ifdef	_KERNEL
1121.28Sleo
1131.19Sleo#include <machine/intr.h>
1141.1Sleo
1151.31Sjoergvoid delay(unsigned int);
1161.5Sleo
1171.5Sleo#define	DELAY(n)	delay(n)
1181.21Sveego#endif	/* _KERNEL */
1191.1Sleo
1201.21Sveego#endif	/* !_MACHINE_PARAM_H_ */
121