1*a9d86795Sjdolecek /* $NetBSD: param.h,v 1.15 2019/01/07 22:00:31 jdolecek Exp $ */
23f55a7b9Swdk
33f55a7b9Swdk /*
48ac3875aSrmind * Copyright (c) 1988 University of Utah.
53f55a7b9Swdk * Copyright (c) 1992, 1993
63f55a7b9Swdk * The Regents of the University of California. All rights reserved.
73f55a7b9Swdk *
83f55a7b9Swdk * This code is derived from software contributed to Berkeley by
93f55a7b9Swdk * the Systems Programming Group of the University of Utah Computer
103f55a7b9Swdk * Science Department and Ralph Campbell.
113f55a7b9Swdk *
123f55a7b9Swdk * Redistribution and use in source and binary forms, with or without
133f55a7b9Swdk * modification, are permitted provided that the following conditions
143f55a7b9Swdk * are met:
153f55a7b9Swdk * 1. Redistributions of source code must retain the above copyright
163f55a7b9Swdk * notice, this list of conditions and the following disclaimer.
173f55a7b9Swdk * 2. Redistributions in binary form must reproduce the above copyright
183f55a7b9Swdk * notice, this list of conditions and the following disclaimer in the
193f55a7b9Swdk * documentation and/or other materials provided with the distribution.
20aad01611Sagc * 3. Neither the name of the University nor the names of its contributors
21aad01611Sagc * may be used to endorse or promote products derived from this software
22aad01611Sagc * without specific prior written permission.
23aad01611Sagc *
24aad01611Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25aad01611Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26aad01611Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27aad01611Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28aad01611Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29aad01611Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30aad01611Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31aad01611Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32aad01611Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33aad01611Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34aad01611Sagc * SUCH DAMAGE.
35aad01611Sagc *
36aad01611Sagc * from: Utah Hdr: machparam.h 1.11 89/08/14
37aad01611Sagc *
38aad01611Sagc * @(#)param.h 8.1 (Berkeley) 6/10/93
39aad01611Sagc */
403f55a7b9Swdk
41afb7d3cbStsutsui #ifndef _MIPSCO_PARAM_H_
42afb7d3cbStsutsui #define _MIPSCO_PARAM_H_
43afb7d3cbStsutsui
443f55a7b9Swdk /*
453f55a7b9Swdk * Machine dependent constants for Mips Corp. machines
463f55a7b9Swdk */
473f55a7b9Swdk
483f55a7b9Swdk #define _MACHINE mipsco
493f55a7b9Swdk #define MACHINE "mipsco"
503f55a7b9Swdk
51a69ca993Stsutsui #include <mips/mips_param.h>
52a69ca993Stsutsui
533f55a7b9Swdk #define KERNBASE 0x80000000 /* start of kernel virtual */
543f55a7b9Swdk #define KERNTEXTOFF 0x80001000 /* start of kernel text for kvm_mkdb */
553f55a7b9Swdk #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
563f55a7b9Swdk
573f55a7b9Swdk #ifdef _KERNEL
583f55a7b9Swdk #ifndef _LOCORE
593f55a7b9Swdk
6040db4f86She #include <machine/intr.h>
6140db4f86She
6202cdf4d2Sdsl extern void delay(int n);
633f55a7b9Swdk extern int cpuspeed;
64aca8f571Stsutsui static __inline void __attribute__((__unused__))
DELAY(int n)65aca8f571Stsutsui DELAY(int n)
66aca8f571Stsutsui {
67aca8f571Stsutsui register int __N = cpuspeed * n;
68aca8f571Stsutsui
69aca8f571Stsutsui do {
70aca8f571Stsutsui __asm("addiu %0,%1,-1" : "=r" (__N) : "0" (__N));
71aca8f571Stsutsui } while (__N > 0);
72aca8f571Stsutsui }
733f55a7b9Swdk
743f55a7b9Swdk #endif /* !_LOCORE */
753f55a7b9Swdk #endif /* _KERNEL */
76afb7d3cbStsutsui
77afb7d3cbStsutsui #endif /* !_MIPSCO_PARAM_H_ */
78