1*072aa173Sjdolecek /* $NetBSD: param.h,v 1.17 2019/01/07 22:00:31 jdolecek Exp $ */
2db2b0adeStakemura
3db2b0adeStakemura /*
49b6bd2d9Srmind * Copyright (c) 1988 University of Utah.
5db2b0adeStakemura * Copyright (c) 1992, 1993
6db2b0adeStakemura * The Regents of the University of California. All rights reserved.
7db2b0adeStakemura *
8db2b0adeStakemura * This code is derived from software contributed to Berkeley by
9db2b0adeStakemura * the Systems Programming Group of the University of Utah Computer
10db2b0adeStakemura * Science Department and Ralph Campbell.
11db2b0adeStakemura *
12db2b0adeStakemura * Redistribution and use in source and binary forms, with or without
13db2b0adeStakemura * modification, are permitted provided that the following conditions
14db2b0adeStakemura * are met:
15db2b0adeStakemura * 1. Redistributions of source code must retain the above copyright
16db2b0adeStakemura * notice, this list of conditions and the following disclaimer.
17db2b0adeStakemura * 2. Redistributions in binary form must reproduce the above copyright
18db2b0adeStakemura * notice, this list of conditions and the following disclaimer in the
19db2b0adeStakemura * 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 */
40db2b0adeStakemura
41afb7d3cbStsutsui #ifndef _HPCMIPS_PARAM_H_
42afb7d3cbStsutsui #define _HPCMIPS_PARAM_H_
43afb7d3cbStsutsui
44db2b0adeStakemura /*
45db2b0adeStakemura * Machine dependent constants for mips-based Handheld PC.
46db2b0adeStakemura */
47db2b0adeStakemura
48db2b0adeStakemura #define _MACHINE hpcmips
49db2b0adeStakemura #define MACHINE "hpcmips"
50db2b0adeStakemura
51ad0452baStsutsui #include <mips/mips_param.h>
52ad0452baStsutsui
53db2b0adeStakemura #define KERNBASE 0x80000000 /* start of kernel virtual */
5406d80c8fSuch #define KERNTEXTOFF 0x80001000 /* start of kernel text for kvm_mkdb */
55db2b0adeStakemura #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
56db2b0adeStakemura
57db2b0adeStakemura #ifdef _KERNEL
58db2b0adeStakemura #ifndef _LOCORE
59db2b0adeStakemura
60aca8f571Stsutsui void delay(int);
61db2b0adeStakemura extern int cpuspeed;
62aca8f571Stsutsui static __inline void __attribute__((__unused__))
DELAY(int n)63aca8f571Stsutsui DELAY(int n)
64aca8f571Stsutsui {
65aca8f571Stsutsui register int __N = cpuspeed * n;
66aca8f571Stsutsui
67aca8f571Stsutsui do {
68aca8f571Stsutsui __asm("addiu %0,%1,-1" : "=r" (__N) : "0" (__N));
69aca8f571Stsutsui } while (__N > 0);
70aca8f571Stsutsui }
71db2b0adeStakemura
723df61fa9Senami #include <machine/intr.h>
733df61fa9Senami
74db2b0adeStakemura #endif /* !_LOCORE */
75db2b0adeStakemura #endif /* _KERNEL */
76afb7d3cbStsutsui
77afb7d3cbStsutsui #endif /* !_HPCMIPS_PARAM_H_ */
78