1*656c4340Sphx /* $NetBSD: param.h,v 1.50 2015/11/12 12:01:53 phx Exp $ */ 2ec77f0b3Scgd 333e84123Smw /* 49b6bd2d9Srmind * Copyright (c) 1988 University of Utah. 533e84123Smw * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 633e84123Smw * All rights reserved. 733e84123Smw * 833e84123Smw * This code is derived from software contributed to Berkeley by 933e84123Smw * the Systems Programming Group of the University of Utah Computer 1033e84123Smw * Science Department. 1133e84123Smw * 1233e84123Smw * Redistribution and use in source and binary forms, with or without 1333e84123Smw * modification, are permitted provided that the following conditions 1433e84123Smw * are met: 1533e84123Smw * 1. Redistributions of source code must retain the above copyright 1633e84123Smw * notice, this list of conditions and the following disclaimer. 1733e84123Smw * 2. Redistributions in binary form must reproduce the above copyright 1833e84123Smw * notice, this list of conditions and the following disclaimer in the 1933e84123Smw * 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.11 89/08/14$ 37aad01611Sagc * 38aad01611Sagc * @(#)param.h 7.8 (Berkeley) 6/28/91 39aad01611Sagc */ 40931d90fcSveego 41172b2cedSchopps #ifndef _MACHINE_PARAM_H_ 42172b2cedSchopps #define _MACHINE_PARAM_H_ 4333e84123Smw 4433e84123Smw /* 4533e84123Smw * Machine dependent constants for amiga 4633e84123Smw */ 4718ec26aaScgd #define _MACHINE amiga 4833e84123Smw #define MACHINE "amiga" 4933e84123Smw 5033e84123Smw #define PGSHIFT 13 /* LOG2(NBPG) */ 51931d90fcSveego #define KERNBASE 0x00000000 /* start of kernel virtual */ 5233e84123Smw 531c599835Sveego #define UPAGES 2 /* pages of u-area */ 541c599835Sveego 5542395ee3Sveego #include <m68k/param.h> 5642395ee3Sveego 571c599835Sveego #define NPTEPG (NBPG/(sizeof (pt_entry_t))) 581c599835Sveego 59*656c4340Sphx /* We need the same btop macro in device drivers for m68k and powerpc */ 60*656c4340Sphx #define MD_BTOP(pa) m68k_btop(pa) 61*656c4340Sphx 6233e84123Smw /* 63dded044fSthorpej * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized 64dded044fSthorpej * logical pages. 6533e84123Smw */ 664c23b30cSpara #define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) 677cb0b700Sjklos #define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) 6833e84123Smw 697fa7b640Sis #ifdef _KERNEL 7033e84123Smw /* 7132dc3c58Schopps * spl functions; all are normally done in-line 7233e84123Smw */ 73fa924b7bSchs #include <machine/intr.h> 7433e84123Smw 7532dc3c58Schopps /* 7632dc3c58Schopps * point to the custom.intenar and custom.intenaw respectively. 7732dc3c58Schopps */ 7832dc3c58Schopps extern volatile unsigned short *amiga_intena_read, *amiga_intena_write; 7932dc3c58Schopps 80a922ebfbSveego #ifndef _LOCORE 81c04c9a55Smhitch void delay(unsigned int); 82c04c9a55Smhitch #define DELAY(x) delay(x) 8396c6c333Sveego #endif /* !_LOCORE */ 8496c6c333Sveego #endif /* _KERNEL */ 8533e84123Smw 86172b2cedSchopps #endif /* !_MACHINE_PARAM_H_ */ 87