param.h revision 1.26
11.26Sagc/* $NetBSD: param.h,v 1.26 2003/08/07 16:28:41 agc Exp $ */ 21.1Schuck 31.1Schuck/* 41.1Schuck * Copyright (c) 1982, 1986, 1990, 1993 51.1Schuck * The Regents of the University of California. All rights reserved. 61.26Sagc * 71.26Sagc * This code is derived from software contributed to Berkeley by 81.26Sagc * the Systems Programming Group of the University of Utah Computer 91.26Sagc * Science Department. 101.26Sagc * 111.26Sagc * Redistribution and use in source and binary forms, with or without 121.26Sagc * modification, are permitted provided that the following conditions 131.26Sagc * are met: 141.26Sagc * 1. Redistributions of source code must retain the above copyright 151.26Sagc * notice, this list of conditions and the following disclaimer. 161.26Sagc * 2. Redistributions in binary form must reproduce the above copyright 171.26Sagc * notice, this list of conditions and the following disclaimer in the 181.26Sagc * documentation and/or other materials provided with the distribution. 191.26Sagc * 3. Neither the name of the University nor the names of its contributors 201.26Sagc * may be used to endorse or promote products derived from this software 211.26Sagc * without specific prior written permission. 221.26Sagc * 231.26Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.26Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.26Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.26Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.26Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.26Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.26Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.26Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.26Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.26Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.26Sagc * SUCH DAMAGE. 341.26Sagc * 351.26Sagc * from: Utah $Hdr: machparam.h 1.16 92/12/20$ 361.26Sagc * 371.26Sagc * @(#)param.h 8.1 (Berkeley) 6/10/93 381.26Sagc */ 391.26Sagc/* 401.26Sagc * Copyright (c) 1988 University of Utah. 411.1Schuck * 421.1Schuck * This code is derived from software contributed to Berkeley by 431.1Schuck * the Systems Programming Group of the University of Utah Computer 441.1Schuck * Science Department. 451.1Schuck * 461.1Schuck * Redistribution and use in source and binary forms, with or without 471.1Schuck * modification, are permitted provided that the following conditions 481.1Schuck * are met: 491.1Schuck * 1. Redistributions of source code must retain the above copyright 501.1Schuck * notice, this list of conditions and the following disclaimer. 511.1Schuck * 2. Redistributions in binary form must reproduce the above copyright 521.1Schuck * notice, this list of conditions and the following disclaimer in the 531.1Schuck * documentation and/or other materials provided with the distribution. 541.1Schuck * 3. All advertising materials mentioning features or use of this software 551.1Schuck * must display the following acknowledgement: 561.1Schuck * This product includes software developed by the University of 571.1Schuck * California, Berkeley and its contributors. 581.1Schuck * 4. Neither the name of the University nor the names of its contributors 591.1Schuck * may be used to endorse or promote products derived from this software 601.1Schuck * without specific prior written permission. 611.1Schuck * 621.1Schuck * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 631.1Schuck * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 641.1Schuck * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 651.1Schuck * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 661.1Schuck * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 671.1Schuck * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 681.1Schuck * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 691.1Schuck * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 701.1Schuck * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 711.1Schuck * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 721.1Schuck * SUCH DAMAGE. 731.1Schuck * 741.1Schuck * from: Utah $Hdr: machparam.h 1.16 92/12/20$ 751.1Schuck * 761.1Schuck * @(#)param.h 8.1 (Berkeley) 6/10/93 771.1Schuck */ 781.1Schuck 791.8Sveego#ifndef _MACHINE_PARAM_H_ 801.8Sveego#define _MACHINE_PARAM_H_ 811.8Sveego 821.1Schuck/* 831.1Schuck * Machine dependent constants for mvme68k, based on HP9000 series 300. 841.1Schuck */ 851.5Scgd#define _MACHINE mvme68k 861.4Scgd#define MACHINE "mvme68k" 871.1Schuck 881.20Sscw/* 891.20Sscw * Grab the interrupt definitions 901.20Sscw */ 911.20Sscw#include <machine/intr.h> 921.20Sscw 931.8Sveego#define PGSHIFT 12 /* LOG2(NBPG) */ 941.8Sveego#define KERNBASE 0x00000000 /* start of kernel virtual */ 951.8Sveego 961.9Sveego#define SEGSHIFT 22 /* LOG2(NBSEG) */ 971.21Sscw#if defined(M68030) && !defined(M68040) && !defined(M68060) 981.9Sveego#define NBSEG (1 << SEGSHIFT) /* bytes/segment */ 991.24Sscw#elif (defined(M68040) || defined(M68060)) && !defined(M68030) 1001.25Schs#define NBSEG (32 * (1 << PGSHIFT)) 1011.21Sscw#else 1021.21Sscw#define NBSEG ((mmutype == MMU_68040) ? \ 1031.21Sscw (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT))) 1041.21Sscw#endif 1051.9Sveego#define SEGOFSET (NBSEG-1) /* byte offset into segment */ 1061.9Sveego 1071.23Sscw#define UPAGES 2 /* pages of u-area */ 1081.1Schuck 1091.8Sveego#include <m68k/param.h> 1101.10Sveego 1111.10Sveego#define NPTEPG (NBPG/(sizeof (pt_entry_t))) 1121.1Schuck 1131.1Schuck/* 1141.19Sthorpej * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized 1151.19Sthorpej * logical pages. 1161.1Schuck */ 1171.19Sthorpej#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) 1181.19Sthorpej#define NKMEMPAGES_MAX_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) 1191.1Schuck 1201.20Sscw#if defined(_KERNEL) && !defined(_LOCORE) 1211.6Schuckextern void _delay __P((unsigned)); 1221.22Sscw#define delay(us) _delay((us)<<10) 1231.6Schuck#define DELAY(n) delay(n) 1241.20Sscw#endif /* _KERNEL && !_LOCORE */ 1251.8Sveego 1261.8Sveego#endif /* !_MACHINE_PARAM_H_ */ 127