uvax.h revision 1.2 1 1.2 ragge /* $NetBSD: uvax.h,v 1.2 1997/02/19 10:06:07 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.2 ragge #ifndef _VAX_UVAX_H_
36 1.2 ragge #define _VAX_UVAX_H_
37 1.2 ragge
38 1.1 ragge /*
39 1.1 ragge * generic(?) MicroVAX and VAXstation support
40 1.1 ragge *
41 1.1 ragge * There are similarities to struct cpu_calls[] in autoconf.c
42 1.1 ragge */
43 1.1 ragge
44 1.1 ragge /*
45 1.1 ragge * Prototypes for autoconf.c
46 1.1 ragge */
47 1.1 ragge struct device;
48 1.1 ragge void uvax_conf __P((struct device*, struct device*, void*));
49 1.1 ragge int uvax_clock __P((void));
50 1.1 ragge void uvax_memerr __P((void));
51 1.1 ragge int uvax_mchk __P((caddr_t));
52 1.1 ragge void uvax_steal_pages __P((void));
53 1.1 ragge
54 1.1 ragge int uvax_setup __P((int mapen));
55 1.1 ragge
56 1.1 ragge struct uvax_calls {
57 1.1 ragge u_long (*uc_memsize) __P((void));
58 1.1 ragge
59 1.1 ragge char *uc_name;
60 1.1 ragge
61 1.1 ragge void *le_iomem; /* base addr of RAM -- CPU's view */
62 1.1 ragge u_long *le_ioaddr; /* base addr of RAM -- LANCE's view */
63 1.1 ragge int *le_memsize; /* size of RAM reserved for LANCE */
64 1.1 ragge
65 1.1 ragge void *uc_physmap;
66 1.1 ragge int uc_vups; /* used by delay() */
67 1.1 ragge
68 1.1 ragge int uv_flags;
69 1.1 ragge int vs_flags;
70 1.1 ragge };
71 1.1 ragge
72 1.1 ragge extern struct uvax_calls guc; /* Generic uVAX Calls */
73 1.1 ragge extern struct uvax_calls *ucp;
74 1.1 ragge
75 1.1 ragge struct uc_map {
76 1.1 ragge u_long um_base;
77 1.1 ragge u_long um_end;
78 1.1 ragge u_long um_size;
79 1.1 ragge u_long um_virt;
80 1.1 ragge };
81 1.1 ragge extern struct uc_map *uc_physmap;
82 1.1 ragge
83 1.1 ragge /*
84 1.1 ragge * Generic definitions common on all MicroVAXen clock chip.
85 1.1 ragge */
86 1.1 ragge #define uVAX_CLKVRT 0200
87 1.1 ragge #define uVAX_CLKUIP 0200
88 1.1 ragge #define uVAX_CLKRATE 040
89 1.1 ragge #define uVAX_CLKENABLE 06
90 1.1 ragge #define uVAX_CLKSET 0206
91 1.1 ragge
92 1.1 ragge /* cpmbx bits */
93 1.1 ragge #define uVAX_CLKHLTACT 03
94 1.1 ragge
95 1.1 ragge /* halt action values */
96 1.1 ragge #define uVAX_CLKRESTRT 01
97 1.1 ragge #define uVAX_CLKREBOOT 02
98 1.1 ragge #define uVAX_CLKHALT 03
99 1.1 ragge
100 1.1 ragge /* in progress flags */
101 1.1 ragge #define uVAX_CLKBOOT 04
102 1.1 ragge #define uVAX_CLKRSTRT 010
103 1.1 ragge #define uVAX_CLKLANG 0360
104 1.1 ragge
105 1.1 ragge /* Prototypes */
106 1.1 ragge int uvax_clkread __P((time_t));
107 1.1 ragge void uvax_clkwrite __P((void));
108 1.2 ragge void uvax_fillmap __P((void));
109 1.2 ragge u_long uvax_phys2virt __P((u_long));
110 1.2 ragge #endif
111