1 /* $NetBSD: machdep.h,v 1.16 2024/01/13 00:44:42 thorpej Exp $ */ 2 3 /* 4 * Copyright (c) 1982, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Systems Programming Group of the University of Utah Computer 9 * Science Department. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. Neither the name of the University nor the names of its contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: Utah Hdr: cpu.h 1.16 91/03/25 36 * from: @(#)cpu.h 7.7 (Berkeley) 6/27/91 37 * cpu.h,v 1.2 1993/05/22 07:58:17 cgd Exp 38 */ 39 40 /* 41 * Copyright (c) 2001 Matthew Fredette 42 * Copyright (c) 1994 Gordon W. Ross 43 * Copyright (c) 1993 Adam Glass 44 * Copyright (c) 1988 University of Utah. 45 * 46 * This code is derived from software contributed to Berkeley by 47 * the Systems Programming Group of the University of Utah Computer 48 * Science Department. 49 * 50 * Redistribution and use in source and binary forms, with or without 51 * modification, are permitted provided that the following conditions 52 * are met: 53 * 1. Redistributions of source code must retain the above copyright 54 * notice, this list of conditions and the following disclaimer. 55 * 2. Redistributions in binary form must reproduce the above copyright 56 * notice, this list of conditions and the following disclaimer in the 57 * documentation and/or other materials provided with the distribution. 58 * 3. All advertising materials mentioning features or use of this software 59 * must display the following acknowledgement: 60 * This product includes software developed by the University of 61 * California, Berkeley and its contributors. 62 * 4. Neither the name of the University nor the names of its contributors 63 * may be used to endorse or promote products derived from this software 64 * without specific prior written permission. 65 * 66 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 67 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 68 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 69 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 70 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 71 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 72 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 73 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 74 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 75 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 76 * SUCH DAMAGE. 77 * 78 * from: Utah Hdr: cpu.h 1.16 91/03/25 79 * from: @(#)cpu.h 7.7 (Berkeley) 6/27/91 80 * cpu.h,v 1.2 1993/05/22 07:58:17 cgd Exp 81 */ 82 83 /* 84 * Internal definitions unique to sun2/68k CPU support. 85 * These are the "private" declarations - those needed 86 * only here in machine-independent code. The "public" 87 * definitions are in cpu.h (used by common code). 88 */ 89 90 #ifdef _KERNEL 91 92 /* Prototypes... */ 93 94 struct frame; 95 struct fpframe; 96 struct pcb; 97 struct proc; 98 struct reg; 99 struct trapframe; 100 struct uio; 101 102 extern int fputype; 103 104 extern label_t *nofault; 105 106 extern vaddr_t vmmap; /* XXX - See mem.c */ 107 108 void clock_init (void); 109 void cninit(void); 110 111 void dumpsys(void); 112 113 int fpu_emulate(struct trapframe *, struct fpframe *, ksiginfo_t *); 114 115 void initfpu(void); 116 117 void set_clk_mode(int, int); 118 119 void g0_entry(void); 120 void g4_entry(void); 121 122 void swapconf(void); 123 124 void zs_init(void); 125 126 struct sun2_kcore_hdr; 127 128 /* Kernel virtual address space available: */ 129 extern vaddr_t virtual_avail, virtual_end; 130 /* Physical address space available: */ 131 extern paddr_t avail_start, avail_end; 132 133 /* pmap.c */ 134 void pmap_bootstrap(vaddr_t nextva); 135 void pmap_kcore_hdr(struct sun2_kcore_hdr *); 136 void pmap_get_pagemap(int *pt, int off); 137 138 #endif /* _KERNEL */ 139