param.h revision 1.1
11.1Stsutsui/* $NetBSD: param.h,v 1.1 1999/12/09 14:53:12 tsutsui Exp $ */ 21.1Stsutsui 31.1Stsutsui/* 41.1Stsutsui * Copyright (c) 1988 University of Utah. 51.1Stsutsui * Copyright (c) 1982, 1986, 1990, 1993 61.1Stsutsui * The Regents of the University of California. All rights reserved. 71.1Stsutsui * 81.1Stsutsui * This code is derived from software contributed to Berkeley by 91.1Stsutsui * the Systems Programming Group of the University of Utah Computer 101.1Stsutsui * Science Department. 111.1Stsutsui * 121.1Stsutsui * Redistribution and use in source and binary forms, with or without 131.1Stsutsui * modification, are permitted provided that the following conditions 141.1Stsutsui * are met: 151.1Stsutsui * 1. Redistributions of source code must retain the above copyright 161.1Stsutsui * notice, this list of conditions and the following disclaimer. 171.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 181.1Stsutsui * notice, this list of conditions and the following disclaimer in the 191.1Stsutsui * documentation and/or other materials provided with the distribution. 201.1Stsutsui * 3. All advertising materials mentioning features or use of this software 211.1Stsutsui * must display the following acknowledgement: 221.1Stsutsui * This product includes software developed by the University of 231.1Stsutsui * California, Berkeley and its contributors. 241.1Stsutsui * 4. Neither the name of the University nor the names of its contributors 251.1Stsutsui * may be used to endorse or promote products derived from this software 261.1Stsutsui * without specific prior written permission. 271.1Stsutsui * 281.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 291.1Stsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 301.1Stsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 311.1Stsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 321.1Stsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 331.1Stsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 341.1Stsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 351.1Stsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 361.1Stsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 371.1Stsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 381.1Stsutsui * SUCH DAMAGE. 391.1Stsutsui * 401.1Stsutsui * from: Utah $Hdr: machparam.h 1.16 92/12/20$ 411.1Stsutsui * 421.1Stsutsui * @(#)param.h 8.1 (Berkeley) 6/10/93 431.1Stsutsui */ 441.1Stsutsui 451.1Stsutsui#ifndef _MACHINE_PARAM_H_ 461.1Stsutsui#define _MACHINE_PARAM_H_ 471.1Stsutsui 481.1Stsutsui/* 491.1Stsutsui * Interrupt glue. 501.1Stsutsui */ 511.1Stsutsui#include <machine/intr.h> 521.1Stsutsui 531.1Stsutsui/* 541.1Stsutsui * Machine dependent constants for m68k NEWS. 551.1Stsutsui */ 561.1Stsutsui#define _MACHINE news68k 571.1Stsutsui#define MACHINE "news68k" 581.1Stsutsui 591.1Stsutsui 601.1Stsutsui#define PGSHIFT 12 /* LOG2(NBPG) */ 611.1Stsutsui#define KERNBASE 0x00000000 /* start of kernel virtual */ 621.1Stsutsui 631.1Stsutsui#define SEGSHIFT 22 /* LOG2(NBSEG) */ 641.1Stsutsui#define NBSEG (1 << SEGSHIFT) /* bytes/segment */ 651.1Stsutsui#define SEGOFSET (NBSEG-1) /* byte offset into segment */ 661.1Stsutsui 671.1Stsutsui#define UPAGES 3 /* pages of u-area */ 681.1Stsutsui 691.1Stsutsui#include <m68k/param.h> 701.1Stsutsui 711.1Stsutsui#define NPTEPG (NBPG/(sizeof (pt_entry_t))) 721.1Stsutsui 731.1Stsutsui/* 741.1Stsutsui * Size of kernel malloc arena in NBPG-sized logical pages 751.1Stsutsui */ 761.1Stsutsui#ifndef NKMEMCLUSTERS 771.1Stsutsui# define NKMEMCLUSTERS (2 * 2048 * 1024 / NBPG) 781.1Stsutsui#endif 791.1Stsutsui 801.1Stsutsui#if defined(_KERNEL) && !defined(_LOCORE) 811.1Stsutsui#define delay(us) _delay((us) << 8) 821.1Stsutsui#define DELAY(us) delay(us) 831.1Stsutsui 841.1Stsutsuivoid _delay __P((u_int)); 851.1Stsutsui#endif /* _KERNEL && !_LOCORE */ 861.1Stsutsui 871.1Stsutsui#if defined(_KERNEL) && !defined(_LKM) 881.1Stsutsui#include "opt_compat_hpux.h" 891.1Stsutsui#endif 901.1Stsutsui 911.1Stsutsui#ifdef COMPAT_HPUX 921.1Stsutsui/* 931.1Stsutsui * Constants/macros for HPUX multiple mapping of user address space. 941.1Stsutsui * Pages in the first 256Mb are mapped in at every 256Mb segment. 951.1Stsutsui */ 961.1Stsutsui#define HPMMMASK 0xF0000000 971.1Stsutsui#define ISHPMMADDR(v) \ 981.1Stsutsui ((curproc->p_md.md_flags & MDP_HPUXMMAP) && \ 991.1Stsutsui ((unsigned)(v) & HPMMMASK) && \ 1001.1Stsutsui ((unsigned)(v) & HPMMMASK) != HPMMMASK) 1011.1Stsutsui#define HPMMBASEADDR(v) \ 1021.1Stsutsui ((unsigned)(v) & ~HPMMMASK) 1031.1Stsutsui#endif 1041.1Stsutsui 1051.1Stsutsui#endif /* !_MACHINE_PARAM_H_ */ 106