Home | History | Annotate | Line # | Download | only in include
param.h revision 1.3.24.4
      1  1.3.24.4     skrll /*	$NetBSD: param.h,v 1.3.24.4 2005/01/24 08:34:34 skrll Exp $	*/
      2       1.1  fredette 
      3       1.1  fredette /*
      4       1.1  fredette  * Copyright (c) 1982, 1986, 1990, 1993
      5       1.1  fredette  *	The Regents of the University of California.  All rights reserved.
      6       1.1  fredette  *
      7       1.1  fredette  * This code is derived from software contributed to Berkeley by
      8       1.1  fredette  * the Systems Programming Group of the University of Utah Computer
      9       1.1  fredette  * Science Department.
     10       1.1  fredette  *
     11       1.1  fredette  * Redistribution and use in source and binary forms, with or without
     12       1.1  fredette  * modification, are permitted provided that the following conditions
     13       1.1  fredette  * are met:
     14       1.1  fredette  * 1. Redistributions of source code must retain the above copyright
     15       1.1  fredette  *    notice, this list of conditions and the following disclaimer.
     16       1.1  fredette  * 2. Redistributions in binary form must reproduce the above copyright
     17       1.1  fredette  *    notice, this list of conditions and the following disclaimer in the
     18       1.1  fredette  *    documentation and/or other materials provided with the distribution.
     19  1.3.24.1     skrll  * 3. Neither the name of the University nor the names of its contributors
     20  1.3.24.1     skrll  *    may be used to endorse or promote products derived from this software
     21  1.3.24.1     skrll  *    without specific prior written permission.
     22  1.3.24.1     skrll  *
     23  1.3.24.1     skrll  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  1.3.24.1     skrll  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.3.24.1     skrll  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.3.24.1     skrll  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  1.3.24.1     skrll  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.3.24.1     skrll  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.3.24.1     skrll  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.3.24.1     skrll  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.3.24.1     skrll  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.3.24.1     skrll  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.3.24.1     skrll  * SUCH DAMAGE.
     34  1.3.24.1     skrll  *
     35  1.3.24.1     skrll  *	from: Utah Hdr: machparam.h 1.16 92/12/20
     36  1.3.24.1     skrll  *	from: @(#)param.h	8.1 (Berkeley) 6/10/93
     37  1.3.24.1     skrll  */
     38  1.3.24.1     skrll /*
     39  1.3.24.1     skrll  * Copyright (c) 1988 University of Utah.
     40  1.3.24.1     skrll  *
     41  1.3.24.1     skrll  * This code is derived from software contributed to Berkeley by
     42  1.3.24.1     skrll  * the Systems Programming Group of the University of Utah Computer
     43  1.3.24.1     skrll  * Science Department.
     44  1.3.24.1     skrll  *
     45  1.3.24.1     skrll  * Redistribution and use in source and binary forms, with or without
     46  1.3.24.1     skrll  * modification, are permitted provided that the following conditions
     47  1.3.24.1     skrll  * are met:
     48  1.3.24.1     skrll  * 1. Redistributions of source code must retain the above copyright
     49  1.3.24.1     skrll  *    notice, this list of conditions and the following disclaimer.
     50  1.3.24.1     skrll  * 2. Redistributions in binary form must reproduce the above copyright
     51  1.3.24.1     skrll  *    notice, this list of conditions and the following disclaimer in the
     52  1.3.24.1     skrll  *    documentation and/or other materials provided with the distribution.
     53       1.1  fredette  * 3. All advertising materials mentioning features or use of this software
     54       1.1  fredette  *    must display the following acknowledgement:
     55       1.1  fredette  *	This product includes software developed by the University of
     56       1.1  fredette  *	California, Berkeley and its contributors.
     57       1.1  fredette  * 4. Neither the name of the University nor the names of its contributors
     58       1.1  fredette  *    may be used to endorse or promote products derived from this software
     59       1.1  fredette  *    without specific prior written permission.
     60       1.1  fredette  *
     61       1.1  fredette  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     62       1.1  fredette  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     63       1.1  fredette  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     64       1.1  fredette  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     65       1.1  fredette  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     66       1.1  fredette  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     67       1.1  fredette  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     68       1.1  fredette  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     69       1.1  fredette  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     70       1.1  fredette  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     71       1.1  fredette  * SUCH DAMAGE.
     72       1.1  fredette  *
     73       1.1  fredette  *	from: Utah Hdr: machparam.h 1.16 92/12/20
     74       1.1  fredette  *	from: @(#)param.h	8.1 (Berkeley) 6/10/93
     75       1.1  fredette  */
     76       1.1  fredette 
     77       1.1  fredette #ifndef	_MACHINE_PARAM_H_
     78       1.1  fredette #define	_MACHINE_PARAM_H_
     79       1.1  fredette 
     80       1.1  fredette /*
     81       1.1  fredette  * Machine dependent constants for the Sun2 series.
     82       1.1  fredette  */
     83       1.1  fredette #define	_MACHINE	sun2
     84       1.1  fredette #define	MACHINE		"sun2"
     85       1.1  fredette #define	_MACHINE_ARCH	m68000
     86       1.1  fredette #define	MACHINE_ARCH	"m68000"
     87       1.1  fredette #define	MID_MACHINE	MID_M680002K
     88       1.1  fredette 
     89       1.3  fredette #define PGSHIFT		11		/* LOG2(NBPG) */
     90       1.3  fredette 
     91       1.1  fredette #ifdef MSGBUFSIZE
     92       1.1  fredette #error "MSGBUFSIZE is not user-adjustable for this arch"
     93       1.1  fredette #endif
     94       1.3  fredette #define MSGBUFOFF	0x0
     95       1.3  fredette #define MSGBUFSIZE	((NBPG * 4) - MSGBUFOFF)
     96       1.1  fredette 
     97       1.1  fredette /* This is needed by ps (actually USPACE). */
     98       1.1  fredette #define	UPAGES		(16384 / NBPG)		/* pages of u-area */
     99       1.1  fredette 
    100       1.1  fredette #if defined(_KERNEL) || defined(_STANDALONE)
    101       1.1  fredette 
    102       1.3  fredette #define	KERNBASE	0x00006000	/* start of kernel virtual */
    103       1.1  fredette #define	KERN_END	0x00E00000	/* end of kernel virtual */
    104       1.1  fredette 
    105       1.1  fredette #define SEGSHIFT	15	        /* LOG2(NBSG) */
    106       1.1  fredette #define NBSG		(1 << SEGSHIFT)	/* bytes/segment */
    107       1.1  fredette #define	SEGOFSET	(NBSG-1)	/* byte offset into segment */
    108       1.1  fredette 
    109       1.1  fredette #define	MAXBSIZE	0x2000		/* max FS block size */
    110  1.3.24.1     skrll #define	MAXPHYS		0xe000
    111       1.1  fredette 
    112       1.1  fredette /*
    113       1.1  fredette  * XXX fredette - we force a small number of mbuf clusters and cluster
    114       1.1  fredette  * size to help me debug this on my low-memory machine.  These should
    115       1.1  fredette  * go away at some point.
    116       1.1  fredette  */
    117       1.1  fredette #define	NMBCLUSTERS	64	/* map size, max cluster allocation */
    118       1.1  fredette #define MCLSHIFT	10
    119       1.2  fredette 
    120       1.2  fredette /*
    121       1.2  fredette  * XXX fredette - we must define this, otw UBC consumes 8MB of kernel VM.
    122       1.2  fredette  * For now, we make it absurdly small, perhaps it can grow later.
    123       1.2  fredette  */
    124       1.2  fredette #define	UBC_NWINS	32
    125       1.1  fredette 
    126       1.1  fredette #endif	/* _KERNEL */
    127       1.1  fredette 
    128       1.1  fredette #include <m68k/param.h>
    129       1.1  fredette 
    130       1.1  fredette /*
    131       1.1  fredette  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
    132       1.1  fredette  * logical pages.
    133       1.1  fredette  */
    134       1.1  fredette #define	NKMEMPAGES_MIN_DEFAULT	((3 * 1024 * 1024) >> PAGE_SHIFT)
    135       1.1  fredette #define	NKMEMPAGES_MAX_DEFAULT	((3 * 1024 * 1024) >> PAGE_SHIFT)
    136       1.1  fredette 
    137       1.1  fredette #if defined(_KERNEL) && !defined(_LOCORE)
    138       1.1  fredette 
    139  1.3.24.4     skrll #include <machine/intr.h>
    140       1.1  fredette 
    141  1.3.24.4     skrll extern void _delay(unsigned);
    142       1.1  fredette #define delay(us)	_delay((us)<<8)
    143       1.1  fredette #define	DELAY(n)	delay(n)
    144       1.1  fredette 
    145       1.1  fredette #endif	/* _KERNEL && !_LOCORE */
    146       1.1  fredette #endif	/* !_MACHINE_PARAM_H_ */
    147