param.h revision 1.13
11.13Schristos/* $NetBSD: param.h,v 1.13 2017/01/14 22:24:43 christos Exp $ */ 21.1Sdrochner 31.1Sdrochner/* 41.11Srmind * 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.6Sagc * 81.6Sagc * This code is derived from software contributed to Berkeley by 91.6Sagc * the Systems Programming Group of the University of Utah Computer 101.6Sagc * Science Department. 111.6Sagc * 121.6Sagc * Redistribution and use in source and binary forms, with or without 131.6Sagc * modification, are permitted provided that the following conditions 141.6Sagc * are met: 151.6Sagc * 1. Redistributions of source code must retain the above copyright 161.6Sagc * notice, this list of conditions and the following disclaimer. 171.6Sagc * 2. Redistributions in binary form must reproduce the above copyright 181.6Sagc * notice, this list of conditions and the following disclaimer in the 191.6Sagc * documentation and/or other materials provided with the distribution. 201.6Sagc * 3. Neither the name of the University nor the names of its contributors 211.6Sagc * may be used to endorse or promote products derived from this software 221.6Sagc * without specific prior written permission. 231.6Sagc * 241.6Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 251.6Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 261.6Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 271.6Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 281.6Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 291.6Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 301.6Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 311.6Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 321.6Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 331.6Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 341.6Sagc * SUCH DAMAGE. 351.6Sagc * 361.6Sagc * from: Utah $Hdr: machparam.h 1.16 92/12/20$ 371.6Sagc * 381.6Sagc * @(#)param.h 8.1 (Berkeley) 6/10/93 391.6Sagc */ 401.13Schristos#ifndef _MACHINE_PARAM_H_ 411.13Schristos#define _MACHINE_PARAM_H_ 421.1Sdrochner/* 431.1Sdrochner * Machine dependent constants for CES FIC8234. 441.1Sdrochner */ 451.1Sdrochner#define _MACHINE cesfic 461.1Sdrochner#define MACHINE "cesfic" 471.1Sdrochner 481.1Sdrochner/* 491.1Sdrochner * Round p (pointer or byte index) up to a correctly-aligned value for all 501.1Sdrochner * data types (int, long, ...). The result is u_int and must be cast to 511.1Sdrochner * any desired pointer type. 521.1Sdrochner * 531.1Sdrochner * ALIGNED_POINTER is a boolean macro that checks whether an address 541.1Sdrochner * is valid to fetch data elements of type t from on this architecture. 551.1Sdrochner * This does not reflect the optimal alignment, just the possibility 561.1Sdrochner * (within reasonable limits). 571.1Sdrochner * 581.1Sdrochner */ 591.1Sdrochner 601.1Sdrochner#define PGSHIFT 12 /* LOG2(NBPG) */ 611.1Sdrochner#define NPTEPG (NBPG/(sizeof (pt_entry_t))) 621.1Sdrochner 631.1Sdrochner#define KERNBASE 0x00002000 /* start of kernel virtual */ 641.1Sdrochner 651.1Sdrochner#define UPAGES 2 /* pages of u-area */ 661.1Sdrochner 671.1Sdrochner#include <m68k/param.h> 681.1Sdrochner 691.1Sdrochner/* 701.1Sdrochner * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized 711.1Sdrochner * logical pages. 721.1Sdrochner */ 731.12Spara#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) 741.12Spara#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) 751.1Sdrochner 761.1Sdrochner/* 771.3Skleink * Interrupt glue. 781.1Sdrochner */ 791.3Skleink#include <machine/intr.h> 801.1Sdrochner 811.1Sdrochner#if defined(_KERNEL) && !defined(_LOCORE) 821.1Sdrochner#define delay(us) _delay((us) << 8) 831.1Sdrochner#define DELAY(us) delay(us) 841.1Sdrochner 851.8Sdslvoid _delay(u_int); 861.1Sdrochner#endif /* _KERNEL && !_LOCORE */ 871.13Schristos#endif /* _MACHINE_PARAM_H_ */ 88