param.h revision 1.3
11.3Skleink/* $NetBSD: param.h,v 1.3 2002/01/14 19:59:31 kleink Exp $ */ 21.1Sdrochner 31.1Sdrochner/* 41.1Sdrochner * Copyright (c) 1988 University of Utah. 51.1Sdrochner * Copyright (c) 1982, 1986, 1990, 1993 61.1Sdrochner * The Regents of the University of California. All rights reserved. 71.1Sdrochner * 81.1Sdrochner * This code is derived from software contributed to Berkeley by 91.1Sdrochner * the Systems Programming Group of the University of Utah Computer 101.1Sdrochner * Science Department. 111.1Sdrochner * 121.1Sdrochner * Redistribution and use in source and binary forms, with or without 131.1Sdrochner * modification, are permitted provided that the following conditions 141.1Sdrochner * are met: 151.1Sdrochner * 1. Redistributions of source code must retain the above copyright 161.1Sdrochner * notice, this list of conditions and the following disclaimer. 171.1Sdrochner * 2. Redistributions in binary form must reproduce the above copyright 181.1Sdrochner * notice, this list of conditions and the following disclaimer in the 191.1Sdrochner * documentation and/or other materials provided with the distribution. 201.1Sdrochner * 3. All advertising materials mentioning features or use of this software 211.1Sdrochner * must display the following acknowledgement: 221.1Sdrochner * This product includes software developed by the University of 231.1Sdrochner * California, Berkeley and its contributors. 241.1Sdrochner * 4. Neither the name of the University nor the names of its contributors 251.1Sdrochner * may be used to endorse or promote products derived from this software 261.1Sdrochner * without specific prior written permission. 271.1Sdrochner * 281.1Sdrochner * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 291.1Sdrochner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 301.1Sdrochner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 311.1Sdrochner * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 321.1Sdrochner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 331.1Sdrochner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 341.1Sdrochner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 351.1Sdrochner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 361.1Sdrochner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 371.1Sdrochner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 381.1Sdrochner * SUCH DAMAGE. 391.1Sdrochner * 401.1Sdrochner * from: Utah $Hdr: machparam.h 1.16 92/12/20$ 411.1Sdrochner * 421.1Sdrochner * @(#)param.h 8.1 (Berkeley) 6/10/93 431.1Sdrochner */ 441.1Sdrochner 451.1Sdrochner/* 461.1Sdrochner * Machine dependent constants for CES FIC8234. 471.1Sdrochner */ 481.1Sdrochner#define _MACHINE cesfic 491.1Sdrochner#define MACHINE "cesfic" 501.1Sdrochner 511.1Sdrochner/* 521.1Sdrochner * Round p (pointer or byte index) up to a correctly-aligned value for all 531.1Sdrochner * data types (int, long, ...). The result is u_int and must be cast to 541.1Sdrochner * any desired pointer type. 551.1Sdrochner * 561.1Sdrochner * ALIGNED_POINTER is a boolean macro that checks whether an address 571.1Sdrochner * is valid to fetch data elements of type t from on this architecture. 581.1Sdrochner * This does not reflect the optimal alignment, just the possibility 591.1Sdrochner * (within reasonable limits). 601.1Sdrochner * 611.1Sdrochner */ 621.1Sdrochner 631.1Sdrochner#define PGSHIFT 12 /* LOG2(NBPG) */ 641.1Sdrochner#define NPTEPG (NBPG/(sizeof (pt_entry_t))) 651.1Sdrochner 661.1Sdrochner#define SEGSHIFT 22 /* LOG2(NBSEG) */ 671.1Sdrochner#define NBSEG (1 << SEGSHIFT) /* bytes/segment */ 681.1Sdrochner#define SEGOFSET (NBSEG-1) /* byte offset into segment */ 691.1Sdrochner 701.1Sdrochner#define KERNBASE 0x00002000 /* start of kernel virtual */ 711.1Sdrochner 721.1Sdrochner/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */ 731.1Sdrochner#define UPAGES 2 /* pages of u-area */ 741.1Sdrochner 751.1Sdrochner#include <m68k/param.h> 761.1Sdrochner 771.1Sdrochner/* 781.1Sdrochner * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized 791.1Sdrochner * logical pages. 801.1Sdrochner */ 811.1Sdrochner#define NKMEMPAGES_MIN_DEFAULT ((3 * 1024 * 1024) >> PAGE_SHIFT) 821.1Sdrochner#define NKMEMPAGES_MAX_DEFAULT ((3 * 1024 * 1024) >> PAGE_SHIFT) 831.1Sdrochner 841.1Sdrochner/* 851.3Skleink * Interrupt glue. 861.1Sdrochner */ 871.3Skleink#include <machine/intr.h> 881.1Sdrochner 891.1Sdrochner#if defined(_KERNEL) && !defined(_LOCORE) 901.1Sdrochner#define delay(us) _delay((us) << 8) 911.1Sdrochner#define DELAY(us) delay(us) 921.1Sdrochner 931.1Sdrochnervoid _delay __P((u_int)); 941.1Sdrochner#endif /* _KERNEL && !_LOCORE */ 95