alpha.h revision 1.4 1 1.4 ross /* $NetBSD: alpha.h,v 1.4 1999/06/29 07:18:23 ross Exp $ */
2 1.1 ross
3 1.1 ross /*
4 1.1 ross * Copyright (c) 1988 University of Utah.
5 1.1 ross * Copyright (c) 1982, 1990, 1993
6 1.1 ross * The Regents of the University of California. All rights reserved.
7 1.1 ross *
8 1.1 ross * This code is derived from software contributed to Berkeley by
9 1.1 ross * the Systems Programming Group of the University of Utah Computer
10 1.1 ross * Science Department.
11 1.1 ross *
12 1.1 ross * Redistribution and use in source and binary forms, with or without
13 1.1 ross * modification, are permitted provided that the following conditions
14 1.1 ross * are met:
15 1.1 ross * 1. Redistributions of source code must retain the above copyright
16 1.1 ross * notice, this list of conditions and the following disclaimer.
17 1.1 ross * 2. Redistributions in binary form must reproduce the above copyright
18 1.1 ross * notice, this list of conditions and the following disclaimer in the
19 1.1 ross * documentation and/or other materials provided with the distribution.
20 1.1 ross * 3. All advertising materials mentioning features or use of this software
21 1.1 ross * must display the following acknowledgement:
22 1.1 ross * This product includes software developed by the University of
23 1.1 ross * California, Berkeley and its contributors.
24 1.1 ross * 4. Neither the name of the University nor the names of its contributors
25 1.1 ross * may be used to endorse or promote products derived from this software
26 1.1 ross * without specific prior written permission.
27 1.1 ross *
28 1.1 ross * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 1.1 ross * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 1.1 ross * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 1.1 ross * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 1.1 ross * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 1.1 ross * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 1.1 ross * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 1.1 ross * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 1.1 ross * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 1.1 ross * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 1.1 ross * SUCH DAMAGE.
39 1.1 ross *
40 1.1 ross * from: Utah $Hdr: cpu.h 1.16 91/03/25$
41 1.1 ross *
42 1.1 ross * @(#)cpu.h 8.4 (Berkeley) 1/5/94
43 1.1 ross */
44 1.1 ross
45 1.1 ross #ifndef _ALPHA_H_
46 1.1 ross #define _ALPHA_H_
47 1.1 ross
48 1.1 ross /*
49 1.1 ross * CTL_MACHDEP definitions.
50 1.1 ross */
51 1.1 ross #define CPU_CONSDEV 1 /* dev_t: console terminal device */
52 1.1 ross #define CPU_ROOT_DEVICE 2 /* string: root device name */
53 1.1 ross #define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */
54 1.1 ross #define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */
55 1.1 ross #define CPU_UNALIGNED_SIGBUS 5 /* int: SIGBUS unaligned accesses */
56 1.1 ross #define CPU_BOOTED_KERNEL 6 /* string: booted kernel name */
57 1.1 ross #define CPU_MAXID 7 /* 6 valid machdep IDs */
58 1.1 ross
59 1.1 ross #define CTL_MACHDEP_NAMES { \
60 1.1 ross { 0, 0 }, \
61 1.1 ross { "console_device", CTLTYPE_STRUCT }, \
62 1.1 ross { "root_device", CTLTYPE_STRING }, \
63 1.1 ross { "unaligned_print", CTLTYPE_INT }, \
64 1.1 ross { "unaligned_fix", CTLTYPE_INT }, \
65 1.1 ross { "unaligned_sigbus", CTLTYPE_INT }, \
66 1.1 ross { "booted_kernel", CTLTYPE_STRING }, \
67 1.1 ross }
68 1.1 ross
69 1.1 ross #ifdef _KERNEL
70 1.3 thorpej
71 1.3 thorpej #include <machine/bus.h>
72 1.1 ross
73 1.1 ross struct pcb;
74 1.1 ross struct proc;
75 1.1 ross struct reg;
76 1.1 ross struct rpb;
77 1.1 ross struct trapframe;
78 1.1 ross
79 1.1 ross /* Per-CPU info for handling machine checks, an array of which */
80 1.1 ross /* is allocated early in startup */
81 1.1 ross struct mchkinfo {
82 1.1 ross volatile u_int mc_expected; /* machine check expected */
83 1.1 ross volatile u_int mc_received; /* machine check received */
84 1.1 ross /*
85 1.1 ross * We don't really need more info at this time.
86 1.1 ross */
87 1.1 ross };
88 1.1 ross
89 1.1 ross extern int cold;
90 1.1 ross struct mchkinfo *cpu_mchkinfo __P((void));
91 1.1 ross
92 1.1 ross void XentArith __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
93 1.1 ross void XentIF __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
94 1.1 ross void XentInt __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
95 1.1 ross void XentMM __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
96 1.1 ross void XentRestart __P((void)); /* MAGIC */
97 1.1 ross void XentSys __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
98 1.1 ross void XentUna __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
99 1.1 ross void alpha_init __P((u_long, u_long, u_long, u_long, u_long));
100 1.1 ross int alpha_pa_access __P((u_long));
101 1.1 ross void ast __P((struct trapframe *));
102 1.1 ross int badaddr __P((void *, size_t));
103 1.1 ross int badaddr_read __P((void *, size_t, void *));
104 1.1 ross void child_return __P((void *));
105 1.1 ross u_int64_t console_restart __P((u_int64_t, u_int64_t, u_int64_t));
106 1.1 ross void do_sir __P((void));
107 1.1 ross void dumpconf __P((void));
108 1.1 ross void exception_return __P((void)); /* MAGIC */
109 1.1 ross void frametoreg __P((struct trapframe *, struct reg *));
110 1.1 ross long fswintrberr __P((void)); /* MAGIC */
111 1.1 ross void init_bootstrap_console __P((void));
112 1.1 ross void init_prom_interface __P((struct rpb *));
113 1.1 ross void interrupt
114 1.1 ross __P((unsigned long, unsigned long, unsigned long, struct trapframe *));
115 1.1 ross void machine_check
116 1.1 ross __P((unsigned long, struct trapframe *, unsigned long, unsigned long));
117 1.1 ross u_int64_t hwrpb_checksum __P((void));
118 1.1 ross void hwrpb_restart_setup __P((void));
119 1.1 ross void regdump __P((struct trapframe *));
120 1.1 ross void regtoframe __P((struct reg *, struct trapframe *));
121 1.1 ross void savectx __P((struct pcb *));
122 1.1 ross void switch_exit __P((struct proc *)); /* MAGIC */
123 1.1 ross void switch_trampoline __P((void)); /* MAGIC */
124 1.1 ross void syscall __P((u_int64_t, struct trapframe *));
125 1.1 ross void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
126 1.1 ross struct trapframe *));
127 1.1 ross void trap_init __P((void));
128 1.1 ross void enable_nsio_ide __P((bus_space_tag_t));
129 1.4 ross char * dot_conv __P((unsigned long));
130 1.1 ross
131 1.1 ross /* Multiprocessor glue; cpu.c */
132 1.2 thorpej struct cpu_info;
133 1.1 ross int cpu_iccb_send __P((long, const char *));
134 1.1 ross void cpu_iccb_receive __P((void));
135 1.2 thorpej void cpu_hatch __P((struct cpu_info *));
136 1.1 ross void cpu_halt_secondary __P((unsigned long));
137 1.1 ross void cpu_spinup_trampoline __P((void)); /* MAGIC */
138 1.1 ross void cpu_pause __P((unsigned long));
139 1.1 ross void cpu_resume __P((unsigned long));
140 1.1 ross
141 1.1 ross #endif /* _KERNEL */
142 1.1 ross #endif /* _ALPHA_H_ */
143