xref: /netbsd/sys/arch/news68k/include/param.h (revision 76bf93e7)
1*76bf93e7Spara /*	$NetBSD: param.h,v 1.17 2012/02/10 17:35:48 para Exp $	*/
2a1099430Stsutsui 
3a1099430Stsutsui /*
48ac3875aSrmind  * Copyright (c) 1988 University of Utah.
5a1099430Stsutsui  * Copyright (c) 1982, 1986, 1990, 1993
6a1099430Stsutsui  *	The Regents of the University of California.  All rights reserved.
7a1099430Stsutsui  *
8a1099430Stsutsui  * This code is derived from software contributed to Berkeley by
9a1099430Stsutsui  * the Systems Programming Group of the University of Utah Computer
10a1099430Stsutsui  * Science Department.
11a1099430Stsutsui  *
12a1099430Stsutsui  * Redistribution and use in source and binary forms, with or without
13a1099430Stsutsui  * modification, are permitted provided that the following conditions
14a1099430Stsutsui  * are met:
15a1099430Stsutsui  * 1. Redistributions of source code must retain the above copyright
16a1099430Stsutsui  *    notice, this list of conditions and the following disclaimer.
17a1099430Stsutsui  * 2. Redistributions in binary form must reproduce the above copyright
18a1099430Stsutsui  *    notice, this list of conditions and the following disclaimer in the
19a1099430Stsutsui  *    documentation and/or other materials provided with the distribution.
20aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
21aad01611Sagc  *    may be used to endorse or promote products derived from this software
22aad01611Sagc  *    without specific prior written permission.
23aad01611Sagc  *
24aad01611Sagc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25aad01611Sagc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26aad01611Sagc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27aad01611Sagc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28aad01611Sagc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29aad01611Sagc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30aad01611Sagc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31aad01611Sagc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32aad01611Sagc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33aad01611Sagc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34aad01611Sagc  * SUCH DAMAGE.
35aad01611Sagc  *
36aad01611Sagc  * from: Utah $Hdr: machparam.h 1.16 92/12/20$
37aad01611Sagc  *
38aad01611Sagc  *	@(#)param.h	8.1 (Berkeley) 6/10/93
39aad01611Sagc  */
40a1099430Stsutsui 
415fc2d9d9Stsutsui #ifndef	_NEWS68K_PARAM_H_
425fc2d9d9Stsutsui #define	_NEWS68K_PARAM_H_
43a1099430Stsutsui 
44a1099430Stsutsui /*
45a1099430Stsutsui  * Machine dependent constants for m68k NEWS.
46a1099430Stsutsui  */
47a1099430Stsutsui #define	_MACHINE	news68k
48a1099430Stsutsui #define	MACHINE		"news68k"
49a1099430Stsutsui 
50a1099430Stsutsui 
51fa836933Stsutsui #define	PGSHIFT		13		/* LOG2(NBPG) */
52a1099430Stsutsui #define	KERNBASE	0x00000000	/* start of kernel virtual */
53a1099430Stsutsui 
547dc077e6Stsutsui #define	UPAGES		2		/* pages of u-area */
55a1099430Stsutsui 
56a1099430Stsutsui #include <m68k/param.h>
57a1099430Stsutsui 
58a1099430Stsutsui #define	NPTEPG		(NBPG/(sizeof (pt_entry_t)))
59a1099430Stsutsui 
60a1099430Stsutsui /*
61dded044fSthorpej  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
62dded044fSthorpej  * logical pages.
63a1099430Stsutsui  */
64*76bf93e7Spara #define	NKMEMPAGES_MIN_DEFAULT	((16 * 1024 * 1024) >> PAGE_SHIFT)
65*76bf93e7Spara #define	NKMEMPAGES_MAX_DEFAULT	((128 * 1024 * 1024) >> PAGE_SHIFT)
66a1099430Stsutsui 
67a1099430Stsutsui #if defined(_KERNEL) && !defined(_LOCORE)
682f5e95ecStsutsui #include <machine/intr.h>
692f5e95ecStsutsui 
70a1099430Stsutsui #define	delay(us)	_delay((us) << 8)
71a1099430Stsutsui #define DELAY(us)	delay(us)
72a1099430Stsutsui 
732cac3aaeStsutsui void	_delay(u_int);
74a1099430Stsutsui #endif /* _KERNEL && !_LOCORE */
75a1099430Stsutsui 
765fc2d9d9Stsutsui #endif	/* !_NEWS68K_PARAM_H_ */
77