1215976Sjmallett/* $NetBSD: param.h,v 1.13 2017/01/14 22:24:43 christos Exp $ */ 2232812Sjmallett 3215976Sjmallett/* 4215976Sjmallett * Copyright (c) 1988 University of Utah. 5215976Sjmallett * Copyright (c) 1982, 1986, 1990, 1993 6215976Sjmallett * The Regents of the University of California. All rights reserved. 7215976Sjmallett * 8215976Sjmallett * This code is derived from software contributed to Berkeley by 9215976Sjmallett * the Systems Programming Group of the University of Utah Computer 10215976Sjmallett * Science Department. 11215976Sjmallett * 12215976Sjmallett * Redistribution and use in source and binary forms, with or without 13215976Sjmallett * modification, are permitted provided that the following conditions 14215976Sjmallett * are met: 15215976Sjmallett * 1. Redistributions of source code must retain the above copyright 16215976Sjmallett * notice, this list of conditions and the following disclaimer. 17215976Sjmallett * 2. Redistributions in binary form must reproduce the above copyright 18232812Sjmallett * notice, this list of conditions and the following disclaimer in the 19215976Sjmallett * documentation and/or other materials provided with the distribution. 20215976Sjmallett * 3. Neither the name of the University nor the names of its contributors 21215976Sjmallett * may be used to endorse or promote products derived from this software 22215976Sjmallett * without specific prior written permission. 23215976Sjmallett * 24215976Sjmallett * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25215976Sjmallett * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26215976Sjmallett * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27215976Sjmallett * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28215976Sjmallett * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29232812Sjmallett * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30215976Sjmallett * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31215976Sjmallett * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32215976Sjmallett * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33215976Sjmallett * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34215976Sjmallett * SUCH DAMAGE. 35215976Sjmallett * 36215976Sjmallett * from: Utah $Hdr: machparam.h 1.16 92/12/20$ 37215976Sjmallett * 38215976Sjmallett * @(#)param.h 8.1 (Berkeley) 6/10/93 39215976Sjmallett */ 40215976Sjmallett#ifndef _MACHINE_PARAM_H_ 41215976Sjmallett#define _MACHINE_PARAM_H_ 42215976Sjmallett/* 43215976Sjmallett * Machine dependent constants for CES FIC8234. 44215976Sjmallett */ 45215976Sjmallett#define _MACHINE cesfic 46215976Sjmallett#define MACHINE "cesfic" 47215976Sjmallett 48215976Sjmallett/* 49215976Sjmallett * Round p (pointer or byte index) up to a correctly-aligned value for all 50215976Sjmallett * data types (int, long, ...). The result is u_int and must be cast to 51215976Sjmallett * any desired pointer type. 52215976Sjmallett * 53215976Sjmallett * ALIGNED_POINTER is a boolean macro that checks whether an address 54215976Sjmallett * is valid to fetch data elements of type t from on this architecture. 55215976Sjmallett * This does not reflect the optimal alignment, just the possibility 56215976Sjmallett * (within reasonable limits). 57215976Sjmallett * 58215976Sjmallett */ 59215976Sjmallett 60215976Sjmallett#define PGSHIFT 12 /* LOG2(NBPG) */ 61215976Sjmallett#define NPTEPG (NBPG/(sizeof (pt_entry_t))) 62215976Sjmallett 63232812Sjmallett#define KERNBASE 0x00002000 /* start of kernel virtual */ 64215976Sjmallett 65215976Sjmallett#define UPAGES 2 /* pages of u-area */ 66215976Sjmallett 67215976Sjmallett#include <m68k/param.h> 68215976Sjmallett 69215976Sjmallett/* 70215976Sjmallett * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized 71232816Sjmallett * logical pages. 72215976Sjmallett */ 73232816Sjmallett#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) 74215976Sjmallett#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) 75215976Sjmallett 76232812Sjmallett/* 77232812Sjmallett * Interrupt glue. 78215976Sjmallett */ 79215976Sjmallett#include <machine/intr.h> 80215976Sjmallett 81215976Sjmallett#if defined(_KERNEL) && !defined(_LOCORE) 82215976Sjmallett#define delay(us) _delay((us) << 8) 83215976Sjmallett#define DELAY(us) delay(us) 84215976Sjmallett 85215976Sjmallettvoid _delay(u_int); 86215976Sjmallett#endif /* _KERNEL && !_LOCORE */ 87215976Sjmallett#endif /* _MACHINE_PARAM_H_ */ 88215976Sjmallett