param.h revision 1.21
11.21Sveego/*	$NetBSD: param.h,v 1.21 1997/06/10 07:54:37 veego Exp $	*/
21.1Sleo
31.1Sleo/*
41.1Sleo * Copyright (c) 1988 University of Utah.
51.1Sleo * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
61.1Sleo * All rights reserved.
71.1Sleo *
81.1Sleo * This code is derived from software contributed to Berkeley by
91.1Sleo * the Systems Programming Group of the University of Utah Computer
101.1Sleo * Science Department.
111.1Sleo *
121.1Sleo * Redistribution and use in source and binary forms, with or without
131.1Sleo * modification, are permitted provided that the following conditions
141.1Sleo * are met:
151.1Sleo * 1. Redistributions of source code must retain the above copyright
161.1Sleo *    notice, this list of conditions and the following disclaimer.
171.1Sleo * 2. Redistributions in binary form must reproduce the above copyright
181.1Sleo *    notice, this list of conditions and the following disclaimer in the
191.1Sleo *    documentation and/or other materials provided with the distribution.
201.1Sleo * 3. All advertising materials mentioning features or use of this software
211.1Sleo *    must display the following acknowledgement:
221.1Sleo *	This product includes software developed by the University of
231.1Sleo *	California, Berkeley and its contributors.
241.1Sleo * 4. Neither the name of the University nor the names of its contributors
251.1Sleo *    may be used to endorse or promote products derived from this software
261.1Sleo *    without specific prior written permission.
271.1Sleo *
281.1Sleo * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
291.1Sleo * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
301.1Sleo * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
311.1Sleo * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
321.1Sleo * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
331.1Sleo * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
341.1Sleo * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
351.1Sleo * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
361.1Sleo * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
371.1Sleo * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
381.1Sleo * SUCH DAMAGE.
391.1Sleo *
401.1Sleo * from: Utah $Hdr: machparam.h 1.11 89/08/14$
411.1Sleo *
421.1Sleo *	@(#)param.h	7.8 (Berkeley) 6/28/91
431.1Sleo */
441.1Sleo
451.21Sveego#ifndef	_MACHINE_PARAM_H_
461.21Sveego#define	_MACHINE_PARAM_H_
471.1Sleo
481.1Sleo/*
491.1Sleo * Machine dependent constants for atari
501.1Sleo */
511.13Scgd#define	_MACHINE	atari
521.1Sleo#define	MACHINE		"atari"
531.1Sleo
541.21Sveego#define	PGSHIFT		13		/* LOG2(NBPG) */
551.21Sveego#define	KERNBASE	0x00000000	/* start of kernel virtual */
561.1Sleo
571.21Sveego#include <m68k/param.h>
581.1Sleo
591.6Sleo#define	SEGSHIFT	24		/* LOG2(NBSEG) [68030 value] */
601.21Sveego#define NBSEG		((mmutype == MMU_68040) ? 32*NBPG : 2048*NBPG)	/* bytes/segment */
611.21Sveego#define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
621.1Sleo
631.1Sleo/*
641.21Sveego * Size of kernel malloc arena in CLBYTES-sized logical pages
651.1Sleo */
661.1Sleo#ifndef NKMEMCLUSTERS
671.21Sveego# define	NKMEMCLUSTERS	(3072 * 1024 / CLBYTES)
681.1Sleo#endif
691.1Sleo
701.1Sleo/*
711.1Sleo * Mach derived conversion macros
721.1Sleo */
731.1Sleo#define atari_round_seg(x)	((((unsigned)(x)) + NBSEG - 1) & ~(NBSEG-1))
741.1Sleo#define atari_trunc_seg(x)	((unsigned)(x) & ~(NBSEG-1))
751.1Sleo#define atari_round_page(x)	((((unsigned)(x)) + NBPG - 1) & ~(NBPG-1))
761.1Sleo#define atari_trunc_page(x)	((unsigned)(x) & ~(NBPG-1))
771.1Sleo#define atari_btos(x)		((unsigned)(x) >> SEGSHIFT)
781.1Sleo#define atari_stob(x)		((unsigned)(x) << SEGSHIFT)
791.1Sleo#define atari_btop(x)		((unsigned)(x) >> PGSHIFT)
801.1Sleo#define atari_ptob(x)		((unsigned)(x) << PGSHIFT)
811.1Sleo
821.19Sleo#include <machine/intr.h>
831.1Sleo
841.21Sveego#ifdef	_KERNEL
851.1Sleovoid delay __P((int));
861.5Sleo
871.5Sleo#define	DELAY(n)	delay(n)
881.21Sveego#endif	/* _KERNEL */
891.1Sleo
901.21Sveego#endif	/* !_MACHINE_PARAM_H_ */
91