1*279ffb36Sthorpej /* $NetBSD: param.h,v 1.33 2019/04/07 03:42:31 thorpej Exp $ */ 2564df9b6Ssoda /* $OpenBSD: param.h,v 1.9 1997/04/30 09:54:15 niklas Exp $ */ 3d4440ff3Ssoda 4d4440ff3Ssoda /* 59b6bd2d9Srmind * Copyright (c) 1988 University of Utah. 6d4440ff3Ssoda * Copyright (c) 1992, 1993 7d4440ff3Ssoda * The Regents of the University of California. All rights reserved. 8d4440ff3Ssoda * 9d4440ff3Ssoda * This code is derived from software contributed to Berkeley by 10d4440ff3Ssoda * the Systems Programming Group of the University of Utah Computer 11d4440ff3Ssoda * Science Department and Ralph Campbell. 12d4440ff3Ssoda * 13d4440ff3Ssoda * Redistribution and use in source and binary forms, with or without 14d4440ff3Ssoda * modification, are permitted provided that the following conditions 15d4440ff3Ssoda * are met: 16d4440ff3Ssoda * 1. Redistributions of source code must retain the above copyright 17d4440ff3Ssoda * notice, this list of conditions and the following disclaimer. 18d4440ff3Ssoda * 2. Redistributions in binary form must reproduce the above copyright 19d4440ff3Ssoda * notice, this list of conditions and the following disclaimer in the 20d4440ff3Ssoda * documentation and/or other materials provided with the distribution. 21aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 22aad01611Sagc * may be used to endorse or promote products derived from this software 23aad01611Sagc * without specific prior written permission. 24aad01611Sagc * 25aad01611Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26aad01611Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27aad01611Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28aad01611Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29aad01611Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30aad01611Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31aad01611Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32aad01611Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33aad01611Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34aad01611Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35aad01611Sagc * SUCH DAMAGE. 36aad01611Sagc * 37aad01611Sagc * from: Utah Hdr: machparam.h 1.11 89/08/14 38aad01611Sagc * from: @(#)param.h 8.1 (Berkeley) 6/10/93 39aad01611Sagc */ 40d4440ff3Ssoda 41564df9b6Ssoda #ifndef _ARC_PARAM_H_ 42564df9b6Ssoda #define _ARC_PARAM_H_ 43564df9b6Ssoda 44d4440ff3Ssoda /* 45d4440ff3Ssoda * Machine-dependent constants (VM, etc) common across MIPS cpus 46d4440ff3Ssoda */ 470eb7af1eStsutsui #define _MACHINE arc 480eb7af1eStsutsui #define MACHINE "arc" 490eb7af1eStsutsui 50d4440ff3Ssoda #include <mips/mips_param.h> 51d4440ff3Ssoda 52d4440ff3Ssoda /* 53564df9b6Ssoda * Machine dependent constants for ARC BIOS MIPS machines: 54564df9b6Ssoda * Acer Labs PICA_61 55564df9b6Ssoda * Deskstation rPC44 56564df9b6Ssoda * Deskstation Tyne 57564df9b6Ssoda * Etc 58d4440ff3Ssoda */ 59d4440ff3Ssoda #define KERNBASE 0x80000000 /* start of kernel virtual */ 60d4440ff3Ssoda #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) 61d4440ff3Ssoda 62d4440ff3Ssoda /* bytes to disk blocks */ 63d4440ff3Ssoda #define btodb(x) ((x) >> DEV_BSHIFT) 64d4440ff3Ssoda #define dbtob(x) ((x) << DEV_BSHIFT) 65d4440ff3Ssoda 66d4440ff3Ssoda #ifdef _KERNEL 67d4440ff3Ssoda #ifndef _LOCORE 68564df9b6Ssoda 69564df9b6Ssoda extern int cpuspeed; 70bdf35647Stsutsui void delay(unsigned int n); 71564df9b6Ssoda 72bdf35647Stsutsui #define DELAY(n) delay(n) 73d4440ff3Ssoda 747978d020Ssoda #include <machine/intr.h> 757978d020Ssoda 76564df9b6Ssoda #endif /* _LOCORE */ 77564df9b6Ssoda #endif /* _KERNEL */ 78564df9b6Ssoda 79564df9b6Ssoda #endif /* _ARC_PARAM_H_ */ 80