uvax.h revision 1.1 1 1.1 ragge /* $NetBSD: uvax.h,v 1.1 1996/07/20 17:58:24 ragge Exp $ */
2 1.1 ragge /*
3 1.1 ragge * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
4 1.1 ragge * All rights reserved.
5 1.1 ragge *
6 1.1 ragge * This code is derived from software contributed to Ludd by Bertram Barth.
7 1.1 ragge *
8 1.1 ragge * Redistribution and use in source and binary forms, with or without
9 1.1 ragge * modification, are permitted provided that the following conditions
10 1.1 ragge * are met:
11 1.1 ragge * 1. Redistributions of source code must retain the above copyright
12 1.1 ragge * notice, this list of conditions and the following disclaimer.
13 1.1 ragge * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 ragge * notice, this list of conditions and the following disclaimer in the
15 1.1 ragge * documentation and/or other materials provided with the distribution.
16 1.1 ragge * 3. All advertising materials mentioning features or use of this software
17 1.1 ragge * must display the following acknowledgement:
18 1.1 ragge * This product includes software developed at Ludd, University of
19 1.1 ragge * Lule}, Sweden and its contributors.
20 1.1 ragge * 4. The name of the author may not be used to endorse or promote products
21 1.1 ragge * derived from this software without specific prior written permission
22 1.1 ragge *
23 1.1 ragge * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 1.1 ragge * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 1.1 ragge * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 1.1 ragge * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 1.1 ragge * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 1.1 ragge * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 1.1 ragge * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 1.1 ragge * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 1.1 ragge * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 1.1 ragge * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 1.1 ragge */
34 1.1 ragge
35 1.1 ragge /*
36 1.1 ragge * generic(?) MicroVAX and VAXstation support
37 1.1 ragge *
38 1.1 ragge * There are similarities to struct cpu_calls[] in autoconf.c
39 1.1 ragge */
40 1.1 ragge
41 1.1 ragge /*
42 1.1 ragge * Prototypes for autoconf.c
43 1.1 ragge */
44 1.1 ragge struct device;
45 1.1 ragge void uvax_conf __P((struct device*, struct device*, void*));
46 1.1 ragge int uvax_clock __P((void));
47 1.1 ragge void uvax_memerr __P((void));
48 1.1 ragge int uvax_mchk __P((caddr_t));
49 1.1 ragge void uvax_steal_pages __P((void));
50 1.1 ragge
51 1.1 ragge int uvax_setup __P((int mapen));
52 1.1 ragge
53 1.1 ragge struct uvax_calls {
54 1.1 ragge u_long (*uc_phys2virt) __P((u_long)); /* most often used! */
55 1.1 ragge u_long (*uc_memsize) __P((void));
56 1.1 ragge void (*uc_steal_pages) __P((void));
57 1.1 ragge void (*uc_conf) __P((struct device*, struct device*, void*));
58 1.1 ragge void (*uc_memerr) __P((void));
59 1.1 ragge int (*uc_mchk) __P((caddr_t));
60 1.1 ragge int (*uc_clkread) __P((time_t));
61 1.1 ragge void (*uc_clkwrite) __P((void));
62 1.1 ragge
63 1.1 ragge char *uc_name;
64 1.1 ragge u_char *uc_intreq;
65 1.1 ragge u_char *uc_intclr;
66 1.1 ragge u_char *uc_intmsk;
67 1.1 ragge
68 1.1 ragge void *le_iomem; /* base addr of RAM -- CPU's view */
69 1.1 ragge u_long *le_ioaddr; /* base addr of RAM -- LANCE's view */
70 1.1 ragge int *le_memsize; /* size of RAM reserved for LANCE */
71 1.1 ragge
72 1.1 ragge void *uc_physmap;
73 1.1 ragge int uc_busTypes;
74 1.1 ragge int uc_vups; /* used by delay() */
75 1.1 ragge
76 1.1 ragge int uv_flags;
77 1.1 ragge int vs_flags;
78 1.1 ragge };
79 1.1 ragge
80 1.1 ragge extern struct uvax_calls guc; /* Generic uVAX Calls */
81 1.1 ragge extern struct uvax_calls *ucp;
82 1.1 ragge
83 1.1 ragge struct uc_map {
84 1.1 ragge u_long um_base;
85 1.1 ragge u_long um_end;
86 1.1 ragge u_long um_size;
87 1.1 ragge u_long um_virt;
88 1.1 ragge };
89 1.1 ragge extern struct uc_map *uc_physmap;
90 1.1 ragge
91 1.1 ragge /*
92 1.1 ragge * Generic definitions common on all MicroVAXen clock chip.
93 1.1 ragge */
94 1.1 ragge #define uVAX_CLKVRT 0200
95 1.1 ragge #define uVAX_CLKUIP 0200
96 1.1 ragge #define uVAX_CLKRATE 040
97 1.1 ragge #define uVAX_CLKENABLE 06
98 1.1 ragge #define uVAX_CLKSET 0206
99 1.1 ragge
100 1.1 ragge /* cpmbx bits */
101 1.1 ragge #define uVAX_CLKHLTACT 03
102 1.1 ragge
103 1.1 ragge /* halt action values */
104 1.1 ragge #define uVAX_CLKRESTRT 01
105 1.1 ragge #define uVAX_CLKREBOOT 02
106 1.1 ragge #define uVAX_CLKHALT 03
107 1.1 ragge
108 1.1 ragge /* in progress flags */
109 1.1 ragge #define uVAX_CLKBOOT 04
110 1.1 ragge #define uVAX_CLKRSTRT 010
111 1.1 ragge #define uVAX_CLKLANG 0360
112 1.1 ragge
113 1.1 ragge /* Prototypes */
114 1.1 ragge int uvax_clkread __P((time_t));
115 1.1 ragge void uvax_clkwrite __P((void));
116