param.h revision 1.12
11.12Spara/*	$NetBSD: param.h,v 1.12 2012/02/10 17:35:49 para Exp $	*/
21.1Sdrochner
31.1Sdrochner/*
41.11Srmind * Copyright (c) 1988 University of Utah.
51.1Sdrochner * Copyright (c) 1982, 1986, 1990, 1993
61.1Sdrochner *	The Regents of the University of California.  All rights reserved.
71.6Sagc *
81.6Sagc * This code is derived from software contributed to Berkeley by
91.6Sagc * the Systems Programming Group of the University of Utah Computer
101.6Sagc * Science Department.
111.6Sagc *
121.6Sagc * Redistribution and use in source and binary forms, with or without
131.6Sagc * modification, are permitted provided that the following conditions
141.6Sagc * are met:
151.6Sagc * 1. Redistributions of source code must retain the above copyright
161.6Sagc *    notice, this list of conditions and the following disclaimer.
171.6Sagc * 2. Redistributions in binary form must reproduce the above copyright
181.6Sagc *    notice, this list of conditions and the following disclaimer in the
191.6Sagc *    documentation and/or other materials provided with the distribution.
201.6Sagc * 3. Neither the name of the University nor the names of its contributors
211.6Sagc *    may be used to endorse or promote products derived from this software
221.6Sagc *    without specific prior written permission.
231.6Sagc *
241.6Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
251.6Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
261.6Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
271.6Sagc * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
281.6Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291.6Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
301.6Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
311.6Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
321.6Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
331.6Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
341.6Sagc * SUCH DAMAGE.
351.6Sagc *
361.6Sagc * from: Utah $Hdr: machparam.h 1.16 92/12/20$
371.6Sagc *
381.6Sagc *	@(#)param.h	8.1 (Berkeley) 6/10/93
391.6Sagc */
401.1Sdrochner
411.1Sdrochner/*
421.1Sdrochner * Machine dependent constants for CES FIC8234.
431.1Sdrochner */
441.1Sdrochner#define	_MACHINE	cesfic
451.1Sdrochner#define	MACHINE		"cesfic"
461.1Sdrochner
471.1Sdrochner/*
481.1Sdrochner * Round p (pointer or byte index) up to a correctly-aligned value for all
491.1Sdrochner * data types (int, long, ...).   The result is u_int and must be cast to
501.1Sdrochner * any desired pointer type.
511.1Sdrochner *
521.1Sdrochner * ALIGNED_POINTER is a boolean macro that checks whether an address
531.1Sdrochner * is valid to fetch data elements of type t from on this architecture.
541.1Sdrochner * This does not reflect the optimal alignment, just the possibility
551.1Sdrochner * (within reasonable limits).
561.1Sdrochner *
571.1Sdrochner */
581.1Sdrochner
591.1Sdrochner#define	PGSHIFT		12		/* LOG2(NBPG) */
601.1Sdrochner#define	NPTEPG		(NBPG/(sizeof (pt_entry_t)))
611.1Sdrochner
621.1Sdrochner#define	KERNBASE	0x00002000	/* start of kernel virtual */
631.1Sdrochner
641.1Sdrochner#define	UPAGES		2		/* pages of u-area */
651.1Sdrochner
661.1Sdrochner#include <m68k/param.h>
671.1Sdrochner
681.1Sdrochner/*
691.1Sdrochner * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
701.1Sdrochner * logical pages.
711.1Sdrochner */
721.12Spara#define	NKMEMPAGES_MIN_DEFAULT	((8 * 1024 * 1024) >> PAGE_SHIFT)
731.12Spara#define	NKMEMPAGES_MAX_DEFAULT	((128 * 1024 * 1024) >> PAGE_SHIFT)
741.1Sdrochner
751.1Sdrochner/*
761.3Skleink * Interrupt glue.
771.1Sdrochner */
781.3Skleink#include <machine/intr.h>
791.1Sdrochner
801.1Sdrochner#if defined(_KERNEL) && !defined(_LOCORE)
811.1Sdrochner#define	delay(us)	_delay((us) << 8)
821.1Sdrochner#define DELAY(us)	delay(us)
831.1Sdrochner
841.8Sdslvoid	_delay(u_int);
851.1Sdrochner#endif /* _KERNEL && !_LOCORE */
86