Home | History | Annotate | Line # | Download | only in include
param.h revision 1.11
      1  1.11     dsl /*	$NetBSD: param.h,v 1.11 2009/03/14 14:45:54 dsl Exp $	*/
      2   1.1      is 
      3   1.1      is /*
      4   1.1      is  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
      5   1.1      is  * All rights reserved.
      6   1.7     agc  *
      7   1.7     agc  * This code is derived from software contributed to Berkeley by
      8   1.7     agc  * the Systems Programming Group of the University of Utah Computer
      9   1.7     agc  * Science Department.
     10   1.7     agc  *
     11   1.7     agc  * Redistribution and use in source and binary forms, with or without
     12   1.7     agc  * modification, are permitted provided that the following conditions
     13   1.7     agc  * are met:
     14   1.7     agc  * 1. Redistributions of source code must retain the above copyright
     15   1.7     agc  *    notice, this list of conditions and the following disclaimer.
     16   1.7     agc  * 2. Redistributions in binary form must reproduce the above copyright
     17   1.7     agc  *    notice, this list of conditions and the following disclaimer in the
     18   1.7     agc  *    documentation and/or other materials provided with the distribution.
     19   1.7     agc  * 3. Neither the name of the University nor the names of its contributors
     20   1.7     agc  *    may be used to endorse or promote products derived from this software
     21   1.7     agc  *    without specific prior written permission.
     22   1.7     agc  *
     23   1.7     agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24   1.7     agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25   1.7     agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26   1.7     agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27   1.7     agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28   1.7     agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29   1.7     agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30   1.7     agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31   1.7     agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32   1.7     agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33   1.7     agc  * SUCH DAMAGE.
     34   1.7     agc  *
     35   1.7     agc  * from: Utah $Hdr: machparam.h 1.11 89/08/14$
     36   1.7     agc  *
     37   1.7     agc  *	@(#)param.h	7.8 (Berkeley) 6/28/91
     38   1.7     agc  */
     39   1.7     agc /*
     40   1.7     agc  * Copyright (c) 1988 University of Utah.
     41   1.1      is  *
     42   1.1      is  * This code is derived from software contributed to Berkeley by
     43   1.1      is  * the Systems Programming Group of the University of Utah Computer
     44   1.1      is  * Science Department.
     45   1.1      is  *
     46   1.1      is  * Redistribution and use in source and binary forms, with or without
     47   1.1      is  * modification, are permitted provided that the following conditions
     48   1.1      is  * are met:
     49   1.1      is  * 1. Redistributions of source code must retain the above copyright
     50   1.1      is  *    notice, this list of conditions and the following disclaimer.
     51   1.1      is  * 2. Redistributions in binary form must reproduce the above copyright
     52   1.1      is  *    notice, this list of conditions and the following disclaimer in the
     53   1.1      is  *    documentation and/or other materials provided with the distribution.
     54   1.1      is  * 3. All advertising materials mentioning features or use of this software
     55   1.1      is  *    must display the following acknowledgement:
     56   1.1      is  *	This product includes software developed by the University of
     57   1.1      is  *	California, Berkeley and its contributors.
     58   1.1      is  * 4. Neither the name of the University nor the names of its contributors
     59   1.1      is  *    may be used to endorse or promote products derived from this software
     60   1.1      is  *    without specific prior written permission.
     61   1.1      is  *
     62   1.1      is  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     63   1.1      is  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     64   1.1      is  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     65   1.1      is  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     66   1.1      is  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     67   1.1      is  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     68   1.1      is  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     69   1.1      is  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     70   1.1      is  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     71   1.1      is  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     72   1.1      is  * SUCH DAMAGE.
     73   1.1      is  *
     74   1.1      is  * from: Utah $Hdr: machparam.h 1.11 89/08/14$
     75   1.1      is  *
     76   1.1      is  *	@(#)param.h	7.8 (Berkeley) 6/28/91
     77   1.1      is  */
     78   1.1      is 
     79   1.1      is #ifndef	_MACHINE_PARAM_H_
     80   1.1      is #define	_MACHINE_PARAM_H_
     81   1.1      is 
     82   1.1      is #ifdef	_KERNEL
     83   1.1      is #ifndef	_LOCORE
     84   1.1      is #include <machine/cpu.h>
     85   1.1      is #endif	/* _LOCORE */
     86   1.1      is #endif
     87   1.1      is 
     88   1.1      is /*
     89   1.1      is  * Machine dependent constants for Amiga PowerPC (32-bit only currently)
     90   1.1      is  */
     91   1.1      is #define	MACHINE		"amigappc"
     92   1.4   lukem #define	MACHINE_ARCH	"powerpc"
     93   1.1      is #define	MID_MACHINE	MID_POWERPC
     94   1.1      is 
     95   1.1      is #define	ALIGNBYTES		(sizeof(double) - 1)
     96   1.1      is #define	ALIGN(p)		(((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES)
     97   1.4   lukem #define	ALIGNED_POINTER(p,t)	((((u_long)(p)) & (sizeof(t)-1)) == 0)
     98   1.1      is 
     99   1.1      is #define	PGSHIFT		12
    100   1.1      is #define	NBPG		(1 << PGSHIFT)	/* Page size */
    101   1.1      is #define	PGOFSET		(NBPG - 1)
    102   1.1      is 
    103   1.1      is #define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
    104   1.1      is #define	DEV_BSIZE	(1 << DEV_BSHIFT)
    105   1.1      is #define	BLKDEV_IOSIZE	NBPG
    106   1.1      is #define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */
    107   1.1      is 
    108   1.1      is #define	UPAGES		4
    109   1.1      is #define	USPACE		(UPAGES * NBPG)
    110   1.1      is 
    111   1.1      is #ifndef	MSGBUFSIZE
    112   1.1      is #define	MSGBUFSIZE	NBPG		/* default message buffer size */
    113   1.1      is #endif
    114   1.1      is 
    115   1.1      is #define	KERNBASE	0x00000000	/* start of kernel virtual */
    116   1.1      is 
    117   1.1      is /*
    118   1.1      is  * Constants related to network buffer management.
    119   1.1      is  * MCLBYTES must be no larger than NBPG (the software page size), and,
    120   1.1      is  * on machines that exchange pages of input or output buffers with mbuf
    121   1.1      is  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
    122   1.1      is  * of the hardware page size.
    123   1.1      is  */
    124   1.2  itojun #define	MSIZE		256		/* size of an mbuf */
    125   1.1      is #define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
    126   1.1      is #define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
    127   1.1      is 
    128   1.1      is #ifndef NMBCLUSTERS
    129   1.1      is 
    130   1.3     mrg #if defined(_KERNEL_OPT)
    131   1.1      is #include "opt_gateway.h"
    132   1.3     mrg #endif
    133   1.1      is 
    134   1.1      is #ifdef GATEWAY
    135   1.1      is #define	NMBCLUSTERS	512		/* map size, max cluster allocation */
    136   1.1      is #else
    137   1.1      is #define	NMBCLUSTERS	256		/* map size, max cluster allocation */
    138   1.1      is #endif
    139   1.1      is #endif
    140   1.1      is 
    141   1.1      is /*
    142   1.1      is  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
    143   1.1      is  * logical pages.
    144   1.1      is  */
    145   1.4   lukem #define	NKMEMPAGES_MIN_DEFAULT  ((128 * 1024 * 1024) >> PAGE_SHIFT)
    146   1.4   lukem #define	NKMEMPAGES_MAX_DEFAULT  ((128 * 1024 * 1024) >> PAGE_SHIFT)
    147   1.1      is 
    148   1.1      is /*
    149   1.1      is  * Some system constants
    150   1.1      is  */
    151   1.1      is #ifndef	NPMAPS
    152   1.1      is #define	NPMAPS		32768	/* Number of pmaps in system */
    153   1.1      is #endif
    154   1.1      is 
    155   1.1      is #ifdef	_KERNEL
    156   1.1      is /*
    157   1.1      is  * point to the custom.intenar and custom.intenaw respectively.
    158   1.1      is extern volatile unsigned short *amiga_intena_read, *amiga_intena_write;
    159   1.1      is */
    160   1.1      is 
    161   1.1      is /* ADAM: redefiniton of cpu.h */
    162   1.6   bjh21 #if 0
    163   1.1      is #ifndef	_LOCORE
    164  1.11     dsl void delay(int);
    165  1.11     dsl void DELAY(int);
    166   1.5     wiz #endif	/* !_LOCORE */
    167   1.6   bjh21 #endif	/* 0 */
    168   1.1      is #endif	/* _KERNEL */
    169   1.1      is 
    170   1.1      is #endif /* def _MACHINE_PARAM_H_ */
    171