xref: /netbsd/sys/arch/sun2/include/param.h (revision 11b00c74)
1*11b00c74Ssimonb /*	$NetBSD: param.h,v 1.16 2021/05/31 14:38:56 simonb Exp $	*/
222a64b5aSfredette 
322a64b5aSfredette /*
48ac3875aSrmind  * Copyright (c) 1988 University of Utah.
522a64b5aSfredette  * Copyright (c) 1982, 1986, 1990, 1993
622a64b5aSfredette  *	The Regents of the University of California.  All rights reserved.
722a64b5aSfredette  *
822a64b5aSfredette  * This code is derived from software contributed to Berkeley by
922a64b5aSfredette  * the Systems Programming Group of the University of Utah Computer
1022a64b5aSfredette  * Science Department.
1122a64b5aSfredette  *
1222a64b5aSfredette  * Redistribution and use in source and binary forms, with or without
1322a64b5aSfredette  * modification, are permitted provided that the following conditions
1422a64b5aSfredette  * are met:
1522a64b5aSfredette  * 1. Redistributions of source code must retain the above copyright
1622a64b5aSfredette  *    notice, this list of conditions and the following disclaimer.
1722a64b5aSfredette  * 2. Redistributions in binary form must reproduce the above copyright
1822a64b5aSfredette  *    notice, this list of conditions and the following disclaimer in the
1922a64b5aSfredette  *    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  *	from: @(#)param.h	8.1 (Berkeley) 6/10/93
38aad01611Sagc  */
3922a64b5aSfredette 
4022a64b5aSfredette #ifndef	_MACHINE_PARAM_H_
4122a64b5aSfredette #define	_MACHINE_PARAM_H_
4222a64b5aSfredette 
43*11b00c74Ssimonb #ifdef _KERNEL_OPT
44*11b00c74Ssimonb #include "opt_param.h"
45*11b00c74Ssimonb #endif
46*11b00c74Ssimonb 
4722a64b5aSfredette /*
4822a64b5aSfredette  * Machine dependent constants for the Sun2 series.
4922a64b5aSfredette  */
5022a64b5aSfredette #define	_MACHINE	sun2
5122a64b5aSfredette #define	MACHINE		"sun2"
5222a64b5aSfredette #define	_MACHINE_ARCH	m68000
5322a64b5aSfredette #define	MACHINE_ARCH	"m68000"
5422a64b5aSfredette #define	MID_MACHINE	MID_M680002K
5522a64b5aSfredette 
56c5feae5dSfredette #define PGSHIFT		11		/* LOG2(NBPG) */
57c5feae5dSfredette 
5822a64b5aSfredette #ifdef MSGBUFSIZE
5922a64b5aSfredette #error "MSGBUFSIZE is not user-adjustable for this arch"
6022a64b5aSfredette #endif
61c5feae5dSfredette #define MSGBUFOFF	0x0
62c5feae5dSfredette #define MSGBUFSIZE	((NBPG * 4) - MSGBUFOFF)
6322a64b5aSfredette 
6422a64b5aSfredette /* This is needed by ps (actually USPACE). */
6522a64b5aSfredette #define	UPAGES		(16384 / NBPG)		/* pages of u-area */
6622a64b5aSfredette 
6722a64b5aSfredette #if defined(_KERNEL) || defined(_STANDALONE)
6822a64b5aSfredette 
69c5feae5dSfredette #define	KERNBASE	0x00006000	/* start of kernel virtual */
7022a64b5aSfredette #define	KERN_END	0x00E00000	/* end of kernel virtual */
7122a64b5aSfredette 
72ecde337fStsutsui #define	MAXBSIZE	0x4000		/* max FS block size */
73654720aaSmycroft #define	MAXPHYS		0xe000
7422a64b5aSfredette 
7522a64b5aSfredette /*
76d621e29eSjoerg  * XXX fredette - we force a small cluster size to help me debug
77d621e29eSjoerg  * this on my low-memory machine.  These should go away at some point.
7822a64b5aSfredette  */
7922a64b5aSfredette #define MCLSHIFT	10
8022a64b5aSfredette 
810cb40c91Sfredette /*
820cb40c91Sfredette  * XXX fredette - we must define this, otw UBC consumes 8MB of kernel VM.
830cb40c91Sfredette  * For now, we make it absurdly small, perhaps it can grow later.
840cb40c91Sfredette  */
850cb40c91Sfredette #define	UBC_NWINS	32
860cb40c91Sfredette 
87b94f79f0Sad #define	MAXEXEC		1
88b94f79f0Sad 
8922a64b5aSfredette #endif	/* _KERNEL */
9022a64b5aSfredette 
9122a64b5aSfredette #include <m68k/param.h>
9222a64b5aSfredette 
9322a64b5aSfredette /*
9422a64b5aSfredette  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
9522a64b5aSfredette  * logical pages.
9622a64b5aSfredette  */
97301e2e67Stsutsui #define	NKMEMPAGES_MIN_DEFAULT	((4 * 1024 * 1024) >> PAGE_SHIFT)
98301e2e67Stsutsui #define	NKMEMPAGES_MAX_DEFAULT	((8 * 1024 * 1024) >> PAGE_SHIFT)
9922a64b5aSfredette 
10022a64b5aSfredette #if defined(_KERNEL) && !defined(_LOCORE)
10122a64b5aSfredette 
102fa924b7bSchs #include <machine/intr.h>
10322a64b5aSfredette 
10410b1a7beSchs extern void _delay(unsigned);
10522a64b5aSfredette #define delay(us)	_delay((us)<<8)
10622a64b5aSfredette #define	DELAY(n)	delay(n)
10722a64b5aSfredette 
10822a64b5aSfredette #endif	/* _KERNEL && !_LOCORE */
10922a64b5aSfredette #endif	/* !_MACHINE_PARAM_H_ */
110