uvax.h revision 1.6.10.1 1 1.6.10.1 nathanw /* $NetBSD: uvax.h,v 1.6.10.1 2002/10/18 02:40:31 nathanw Exp $ */
2 1.1 ragge /*
3 1.6.10.1 nathanw * Copyright (c) 2002 Hugh Graham.
4 1.1 ragge * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
5 1.1 ragge * All rights reserved.
6 1.1 ragge *
7 1.1 ragge * This code is derived from software contributed to Ludd by Bertram Barth.
8 1.1 ragge *
9 1.1 ragge * Redistribution and use in source and binary forms, with or without
10 1.1 ragge * modification, are permitted provided that the following conditions
11 1.1 ragge * are met:
12 1.1 ragge * 1. Redistributions of source code must retain the above copyright
13 1.1 ragge * notice, this list of conditions and the following disclaimer.
14 1.1 ragge * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 ragge * notice, this list of conditions and the following disclaimer in the
16 1.1 ragge * documentation and/or other materials provided with the distribution.
17 1.1 ragge * 3. All advertising materials mentioning features or use of this software
18 1.1 ragge * must display the following acknowledgement:
19 1.6.10.1 nathanw * This product includes software developed at Ludd, University of
20 1.6.10.1 nathanw * Lule}, Sweden and its contributors.
21 1.1 ragge * 4. The name of the author may not be used to endorse or promote products
22 1.1 ragge * derived from this software without specific prior written permission
23 1.1 ragge *
24 1.1 ragge * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 1.1 ragge * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 1.1 ragge * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 1.1 ragge * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 1.1 ragge * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 1.1 ragge * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 1.1 ragge * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 1.1 ragge * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 1.1 ragge * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 1.1 ragge * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 1.1 ragge */
35 1.1 ragge
36 1.2 ragge #ifndef _VAX_UVAX_H_
37 1.2 ragge #define _VAX_UVAX_H_
38 1.2 ragge
39 1.1 ragge /*
40 1.1 ragge * Generic definitions common on all MicroVAXen clock chip.
41 1.1 ragge */
42 1.6.10.1 nathanw #define uVAX_CLKVRT 0200
43 1.6.10.1 nathanw #define uVAX_CLKUIP 0200
44 1.6.10.1 nathanw #define uVAX_CLKRATE 040
45 1.6.10.1 nathanw #define uVAX_CLKENABLE 06
46 1.6.10.1 nathanw #define uVAX_CLKSET 0206
47 1.1 ragge
48 1.1 ragge /* cpmbx bits */
49 1.6.10.1 nathanw #define uVAX_CLKHLTACT 03
50 1.1 ragge
51 1.1 ragge /* halt action values */
52 1.6.10.1 nathanw #define uVAX_CLKRESTRT 01
53 1.6.10.1 nathanw #define uVAX_CLKREBOOT 02
54 1.6.10.1 nathanw #define uVAX_CLKHALT 03
55 1.1 ragge
56 1.1 ragge /* in progress flags */
57 1.6.10.1 nathanw #define uVAX_CLKBOOT 04
58 1.6.10.1 nathanw #define uVAX_CLKRSTRT 010
59 1.6.10.1 nathanw #define uVAX_CLKLANG 0360
60 1.3 ragge
61 1.3 ragge /*
62 1.3 ragge * Miscellaneous registers common on most VAXststions.
63 1.3 ragge */
64 1.3 ragge struct vs_cpu {
65 1.6.10.1 nathanw u_long vc_hltcod; /* 00 - Halt Code Register */
66 1.6.10.1 nathanw u_long vc_410mser; /* 04 - VS2K */
67 1.6.10.1 nathanw u_long vc_410cear; /* 08 - VS2K */
68 1.6 matt u_char vc_intmsk; /* 0c - Interrupt mask register */
69 1.6 matt u_char vc_vdcorg; /* 0d - Mono display origin */
70 1.6 matt u_char vc_vdcsel; /* 0e - Video interrupt select */
71 1.6 matt u_char vc_intreq; /* 0f - Interrupt request register */
72 1.6.10.1 nathanw #define vc_intclr vc_intreq
73 1.6.10.1 nathanw u_short vc_diagdsp; /* 10 - Diagnostic display register */
74 1.6.10.1 nathanw u_short pad4; /* 12 */
75 1.6.10.1 nathanw u_long vc_parctl; /* 14 - Parity Control Register */
76 1.6.10.1 nathanw #define vc_bwf0 vc_parctl
77 1.6.10.1 nathanw u_short pad5; /* 16 */
78 1.6.10.1 nathanw u_short pad6; /* 18 */
79 1.6.10.1 nathanw u_short vc_diagtimu; /* 1a - usecond timer KA46 */
80 1.6.10.1 nathanw u_short vc_diagtme; /* 1c - Diagnostic time register */
81 1.6.10.1 nathanw #define vc_diagtimm vc_diagtme /* msecond time KA46 */
82 1.3 ragge };
83 1.6.10.1 nathanw #define PARCTL_DMA 0x1000000
84 1.6.10.1 nathanw #define PARCTL_CPEN 2
85 1.6.10.1 nathanw #define PARCTL_DPEN 1
86 1.6.10.1 nathanw
87 1.6.10.1 nathanw
88 1.6.10.1 nathanw /*
89 1.6.10.1 nathanw * Console Mailbox layout common to several models.
90 1.6.10.1 nathanw */
91 1.6.10.1 nathanw
92 1.6.10.1 nathanw struct cpmbx {
93 1.6.10.1 nathanw unsigned int mbox_halt:2; /* mailbox halt action */
94 1.6.10.1 nathanw unsigned int mbox_bip:1; /* bootstrap in progress */
95 1.6.10.1 nathanw unsigned int mbox_rip:1; /* restart in progress */
96 1.6.10.1 nathanw unsigned int mbox_lang:4; /* language info */
97 1.6.10.1 nathanw unsigned int terminal:8; /* terminal info */
98 1.6.10.1 nathanw unsigned int keyboard:8; /* keyboard info */
99 1.6.10.1 nathanw unsigned int user_four:4; /* unknown */
100 1.6.10.1 nathanw unsigned int user_halt:3; /* user halt action */
101 1.6.10.1 nathanw unsigned int user_one:1; /* unknown */
102 1.6.10.1 nathanw };
103 1.6.10.1 nathanw
104 1.6.10.1 nathanw extern struct cpmbx *cpmbx;
105 1.6.10.1 nathanw
106 1.6.10.1 nathanw void generic_halt(void);
107 1.6.10.1 nathanw void generic_reboot(int);
108 1.6.10.1 nathanw
109 1.6.10.1 nathanw #define MHALT_RESTART_REBOOT 0
110 1.6.10.1 nathanw #define MHALT_RESTART 1
111 1.6.10.1 nathanw #define MHALT_REBOOT 2
112 1.6.10.1 nathanw #define MHALT_HALT 3
113 1.6.10.1 nathanw
114 1.6.10.1 nathanw #define UHALT_DEFAULT 0
115 1.6.10.1 nathanw #define UHALT_RESTART 1
116 1.6.10.1 nathanw #define UHALT_REBOOT 2
117 1.6.10.1 nathanw #define UHALT_HALT 3
118 1.6.10.1 nathanw #define UHALT_RESTART_REBOOT 4
119 1.1 ragge
120 1.2 ragge #endif
121