cpuconf.c revision 1.7 1 /* $NetBSD: cpuconf.c,v 1.7 1997/09/23 23:15:43 mjacob Exp $ */
2
3 /*
4 * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Christopher G. Demetriou
17 * for the NetBSD Project.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #include <sys/param.h>
34 #include <sys/device.h>
35 #include <sys/systm.h>
36 #include <machine/cpuconf.h>
37 #include <machine/rpb.h>
38
39 #include "dec_3000_500.h"
40 #if NDEC_3000_500 > 0
41 extern void dec_3000_500_init __P((void));
42 #else
43 #define dec_3000_500_init nocpu
44 #endif
45
46 #include "dec_3000_300.h"
47 #if NDEC_3000_300 > 0
48 extern void dec_3000_300_init __P((void));
49 #else
50 #define dec_3000_300_init nocpu
51 #endif
52
53 #include "dec_axppci_33.h"
54 #if NDEC_AXPPCI_33 > 0
55 extern void dec_axppci_33_init __P((void));
56 #else
57 #define dec_axppci_33_init nocpu
58 #endif
59
60 #include "dec_kn8ae.h"
61 #if NDEC_KN8AE > 0
62 extern void dec_kn8ae_init __P((void));
63 #else
64 #define dec_kn8ae_init nocpu
65 #endif
66
67 #include "dec_2100_a50.h"
68 #if NDEC_2100_A50 > 0
69 extern void dec_2100_a50_init __P((void));
70 #else
71 #define dec_2100_a50_init nocpu
72 #endif
73
74 #include "dec_kn20aa.h"
75 #if NDEC_KN20AA > 0
76 extern void dec_kn20aa_init __P((void));
77 #else
78 #define dec_kn20aa_init nocpu
79 #endif
80
81 #include "dec_eb64plus.h"
82 #if NDEC_EB64PLUS > 0
83 extern void dec_eb64plus_init __P((void));
84 #else
85 #define dec_eb64plus_init nocpu
86 #endif
87
88 #include "dec_eb164.h"
89 #if NDEC_EB164 > 0
90 extern void dec_eb164_init __P((void));
91 #else
92 #define dec_eb164_init nocpu
93 #endif
94
95 void (*cpuinit[]) __P((void)) = {
96 nocpu, /* 0: ??? */
97 nocpu, /* 1: ST_ADU */
98 nocpu, /* 2: ST_DEC_4000 */
99 nocpu, /* 3: ST_DEC_7000 */
100 dec_3000_500_init, /* 4: ST_DEC_3000_500 */
101 nocpu, /* 5: ??? */
102 nocpu, /* 6: ST_DEC_2000_300 */
103 dec_3000_300_init, /* 7: ST_DEC_3000_300 */
104 nocpu, /* 8: ??? */
105 nocpu, /* 9: ST_DEC_2100_A500 */
106 nocpu, /* 10: ST_DEC_APXVME_64 */
107 dec_axppci_33_init, /* 11: ST_DEC_AXPPCI_33 */
108 dec_kn8ae_init, /* 12: ST_DEC_21000 */
109 dec_2100_a50_init, /* 13: ST_DEC_2100_A50 */
110 nocpu, /* 14: ST_DEC_MUSTANG */
111 dec_kn20aa_init, /* 15: ST_DEC_KN20AA */
112 nocpu, /* 16: ??? */
113 nocpu, /* 17: ST_DEC_1000 */
114 nocpu, /* 18: ??? */
115 nocpu, /* 19: ST_EB66 */
116 dec_eb64plus_init, /* 20: ST_EB64P */
117 nocpu, /* 21: ??? */
118 nocpu, /* 22: ST_DEC_4100 */
119 nocpu, /* 23: ST_DEC_EV45_PBP */
120 nocpu, /* 24: ST_DEC_2100A_A500 */
121 nocpu, /* 25: ??? */
122 dec_eb164_init /* 26: ST_EB164 */
123 };
124 int ncpuinit = (sizeof (cpuinit) / sizeof (cpuinit[0]));
125
126 void
127 nocpu()
128 {
129 extern int cputype;
130 printf("\n");
131 printf("Support for system type %d is not present in this kernel.\n",
132 cputype);
133 if (unknown_cpu(cputype)) {
134 printf("NetBSD doesn't support this platform yet.\n");
135 } else {
136 char *o;
137 switch (cputype) {
138 case ST_DEC_3000_500:
139 o = "DEC_3000_500";
140 break;
141 case ST_DEC_3000_300:
142 o = "DEC_3000_300";
143 break;
144 case ST_DEC_AXPPCI_33:
145 o = "DEC_AXPPCI_33";
146 break;
147 case ST_DEC_21000:
148 o = "DEC_KN8AE";
149 break;
150 case ST_DEC_2100_A50:
151 o = "DEC_2100_A50";
152 break;
153 case ST_DEC_KN20AA:
154 o = "DEC_KN20AA";
155 break;
156 case ST_EB64P:
157 o = "DEC_EB64PLUS";
158 break;
159 case ST_EB164:
160 o = "DEC_EB164";
161 break;
162 default:
163 o = "JESUS_KNOWS";
164 break;
165 }
166 printf("Build a kernel with \"options %s\" and reboot.\n", o);
167 }
168 printf("\n");
169 panic("support for system not present");
170 /* NOTREACHED */
171 }
172