|
|
1.1 root 1: /*
2: * Mach Operating System
3: * Copyright (c) 1993,1992,1991,1990,1989 Carnegie Mellon University
4: * All Rights Reserved.
5: *
6: * Permission to use, copy, modify and distribute this software and its
7: * documentation is hereby granted, provided that both the copyright
8: * notice and this permission notice appear in all copies of the
9: * software, derivative works or modified versions, and any portions
10: * thereof, and that both notices appear in supporting documentation.
11: *
12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15: *
16: * Carnegie Mellon requests users of this software to return to
17: *
18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
22: *
23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26:
27: #ifdef MACH_KERNEL
28: #include <mach_ttd.h>
29: #include <mach/std_types.h>
30: #else /* MACH_KERNEL */
31: #include <cpus.h>
32: #include <platforms.h>
33: #include <generic.h>
34: #include <sys/param.h>
35: #include <mach/machine.h>
36: #include <machine/cpu.h>
37: #endif /* MACH_KERNEL */
38: #ifdef LINUX_DEV
39: #include <i386/pic.h>
40: #endif
41: #include <i386/ipl.h>
42: #include <chips/busses.h>
43:
44: /* initialization typecasts */
45: #define SPL_FIVE (vm_offset_t)SPL5
46: #define SPL_SIX (vm_offset_t)SPL6
47: #define SPL_TTY (vm_offset_t)SPLTTY
48:
49:
50: #include <hd.h>
51: #if NHD > 0
52: extern struct bus_driver hddriver;
53: extern int hdintr();
54: #endif /* NHD */
55:
56: #include <fd.h>
57: #if NFD > 0
58: extern struct bus_driver fddriver;
59: extern int fdintr();
60: #endif /* NFD */
61:
62: #include <aha.h>
63: #if NAHA > 0
64: extern struct bus_driver aha_driver;
65: extern int aha_intr();
66: #endif /* NAHA */
67:
68: #include <eaha.h>
69: #if NEAHA > 0
70: extern struct bus_driver eaha_driver;
71: extern int eaha_intr();
72: #endif /* NEAHA */
73:
74: #include <pc586.h>
75: #if NPC586 > 0
76: extern struct bus_driver pcdriver;
77: extern int pc586intr();
78: #endif /* NPC586 */
79:
80: #include <ne.h>
81: #if NNE > 0
82: extern struct bus_driver nedriver;
83: extern int neintr();
84: #endif NNE
85:
86: #include <ns8390.h>
87: #if NNS8390 > 0
88: extern struct bus_driver ns8390driver;
89: extern int ns8390intr();
90: #endif /* NNS8390 */
91:
92: #include <at3c501.h>
93: #if NAT3C501 > 0
94: extern struct bus_driver at3c501driver;
95: extern int at3c501intr();
96: #endif /* NAT3C501 */
97:
98: #include <ul.h>
99: #if NUL > 0
100: extern struct bus_driver uldriver;
101: extern int ulintr();
102: #endif
103:
104: #include <wd.h>
105: #if NWD > 0
106: extern struct bus_driver wddriver;
107: extern int wdintr();
108: #endif
109:
110: #include <hpp.h>
111: #if NHPP > 0
112: extern struct bus_driver hppdriver;
113: extern int hppintr();
114: #endif
115:
116: #include <com.h>
117: #if NCOM > 0
118: extern struct bus_driver comdriver;
119: extern int comintr();
120: #endif /* NCOM */
121:
122: #include <lpr.h>
123: #if NLPR > 0
124: extern struct bus_driver lprdriver;
125: extern int lprintr();
126: #endif /* NLPR */
127:
128: #include <wt.h>
129: #if NWT > 0
130: extern struct bus_driver wtdriver;
131: extern int wtintr();
132: #endif /* NWT */
133:
134: struct bus_ctlr bus_master_init[] = {
135:
136: /* driver name unit intr address len phys_address
137: adaptor alive flags spl pic */
138:
139: #ifndef LINUX_DEV
140: #if NHD > 0
141: {&hddriver, "hdc", 0, hdintr, 0x1f0, 8, 0x1f0,
142: '?', 0, 0, SPL_FIVE, 14},
143:
144: {&hddriver, "hdc", 1, hdintr, 0x170, 8, 0x170,
145: '?', 0, 0, SPL_FIVE, 15},
146: #endif /* NHD > 0 */
147:
148: #if NAHA > 0
149: {&aha_driver, "ahac", 0, aha_intr, 0x330, 4, 0x330,
150: '?', 0, 0, SPL_FIVE, 11},
151:
152: #if NAHA > 1
153:
154: {&aha_driver, "ahac", 1, aha_intr, 0x234, 4, 0x234,
155: '?', 0, 0, SPL_FIVE, 12},
156: {&aha_driver, "ahac", 1, aha_intr, 0x230, 4, 0x230,
157: '?', 0, 0, SPL_FIVE, 12},
158: {&aha_driver, "ahac", 1, aha_intr, 0x134, 4, 0x134,
159: '?', 0, 0, SPL_FIVE, 12},
160: {&aha_driver, "ahac", 1, aha_intr, 0x130, 4, 0x130,
161: '?', 0, 0, SPL_FIVE, 12},
162:
163: #else
164:
165: {&aha_driver, "ahac", 0, aha_intr, 0x334, 4, 0x334,
166: '?', 0, 0, SPL_FIVE, 11},
167: {&aha_driver, "ahac", 0, aha_intr, 0x234, 4, 0x234,
168: '?', 0, 0, SPL_FIVE, 11},
169: {&aha_driver, "ahac", 0, aha_intr, 0x230, 4, 0x230,
170: '?', 0, 0, SPL_FIVE, 11},
171: {&aha_driver, "ahac", 0, aha_intr, 0x134, 4, 0x134,
172: '?', 0, 0, SPL_FIVE, 11},
173: {&aha_driver, "ahac", 0, aha_intr, 0x130, 4, 0x130,
174: '?', 0, 0, SPL_FIVE, 11},
175:
176: #endif /* NAHA > 1 */
177: #endif /* NAHA > 0*/
178:
179: #if NEAHA > 0
180: {&eaha_driver, "eahac", 0, eaha_intr, 0x0000, 4, 0x0000,
181: '?', 0, 0, SPL_FIVE, 12},
182: {&eaha_driver, "eahac", 0, eaha_intr, 0x1000, 4, 0x1000,
183: '?', 0, 0, SPL_FIVE, 12},
184: {&eaha_driver, "eahac", 0, eaha_intr, 0x2000, 4, 0x2000,
185: '?', 0, 0, SPL_FIVE, 12},
186: {&eaha_driver, "eahac", 0, eaha_intr, 0x3000, 4, 0x3000,
187: '?', 0, 0, SPL_FIVE, 12},
188: {&eaha_driver, "eahac", 0, eaha_intr, 0x4000, 4, 0x4000,
189: '?', 0, 0, SPL_FIVE, 12},
190: {&eaha_driver, "eahac", 0, eaha_intr, 0x5000, 4, 0x5000,
191: '?', 0, 0, SPL_FIVE, 12},
192: {&eaha_driver, "eahac", 0, eaha_intr, 0x6000, 4, 0x6000,
193: '?', 0, 0, SPL_FIVE, 12},
194: {&eaha_driver, "eahac", 0, eaha_intr, 0x7000, 4, 0x7000,
195: '?', 0, 0, SPL_FIVE, 12},
196: {&eaha_driver, "eahac", 0, eaha_intr, 0x8000, 4, 0x8000,
197: '?', 0, 0, SPL_FIVE, 12},
198: {&eaha_driver, "eahac", 0, eaha_intr, 0x9000, 4, 0x9000,
199: '?', 0, 0, SPL_FIVE, 12},
200: {&eaha_driver, "eahac", 0, eaha_intr, 0xa000, 4, 0xa000,
201: '?', 0, 0, SPL_FIVE, 12},
202: {&eaha_driver, "eahac", 0, eaha_intr, 0xb000, 4, 0xb000,
203: '?', 0, 0, SPL_FIVE, 12},
204: {&eaha_driver, "eahac", 0, eaha_intr, 0xc000, 4, 0xc000,
205: '?', 0, 0, SPL_FIVE, 12},
206: {&eaha_driver, "eahac", 0, eaha_intr, 0xd000, 4, 0xd000,
207: '?', 0, 0, SPL_FIVE, 12},
208: {&eaha_driver, "eahac", 0, eaha_intr, 0xe000, 4, 0xe000,
209: '?', 0, 0, SPL_FIVE, 12},
210: {&eaha_driver, "eahac", 0, eaha_intr, 0xf000, 4, 0xf000,
211: '?', 0, 0, SPL_FIVE, 12},
212: #endif /* NEAHA > 0 */
213:
214: #if NFD > 0
215: {&fddriver, "fdc", 0, fdintr, 0x3f2, 6, 0x3f2,
216: '?', 0, 0, SPL_FIVE, 6},
217:
218: {&fddriver, "fdc", 1, fdintr, 0x372, 6, 0x372,
219: '?', 0, 0, SPL_FIVE, 10},
220: #endif /* NFD > 0 */
221: #endif /* ! LINUX_DEV */
222:
223: 0
224: };
225:
226:
227: struct bus_device bus_device_init[] = {
228:
229: /* driver name unit intr address am phys_address
230: adaptor alive ctlr slave flags *mi *next sysdep sysdep */
231:
232: #ifndef LINUX_DEV
233: #if NHD > 0
234: {&hddriver, "hd", 0, hdintr, 0x104, 8, 0x1f0,
235: '?', 0, 0, 0, 0, 0, 0, SPL_FIVE, 14},
236: {&hddriver, "hd", 1, hdintr, 0x118, 8, 0x1f0,
237: '?', 0, 0, 1, 0, 0, 0, SPL_FIVE, 14},
238: {&hddriver, "hd", 2, hdintr, 0x104, 8, 0x170, /*??*/
239: '?', 0, 1, 0, 0, 0, 0, SPL_FIVE, 15},
240: {&hddriver, "hd", 3, hdintr, 0x118, 8, 0x170,
241: '?', 0, 1, 1, 0, 0, 0, SPL_FIVE, 15},
242: #endif /* NHD > 0 */
243:
244: #if NAHA > 0
245: { &aha_driver, "rz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
246: { &aha_driver, "rz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
247: { &aha_driver, "rz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
248: { &aha_driver, "rz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
249: { &aha_driver, "rz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
250: { &aha_driver, "rz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
251: { &aha_driver, "rz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
252: { &aha_driver, "rz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
253:
254: { &aha_driver, "tz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
255: { &aha_driver, "tz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
256: { &aha_driver, "tz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
257: { &aha_driver, "tz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
258: { &aha_driver, "tz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
259: { &aha_driver, "tz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
260: { &aha_driver, "tz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
261: { &aha_driver, "tz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
262:
263: #if NAHA > 1
264:
265: { &aha_driver, "rz", 8, 0, 0x0,0, 0, '?', 0, 1, 0, 0, },
266: { &aha_driver, "rz", 9, 0, 0x0,0, 0, '?', 0, 1, 1, 0, },
267: { &aha_driver, "rz", 10, 0, 0x0,0, 0, '?', 0, 1, 2, 0, },
268: { &aha_driver, "rz", 11, 0, 0x0,0, 0, '?', 0, 1, 3, 0, },
269: { &aha_driver, "rz", 12, 0, 0x0,0, 0, '?', 0, 1, 4, 0, },
270: { &aha_driver, "rz", 13, 0, 0x0,0, 0, '?', 0, 1, 5, 0, },
271: { &aha_driver, "rz", 14, 0, 0x0,0, 0, '?', 0, 1, 6, 0, },
272: { &aha_driver, "rz", 15, 0, 0x0,0, 0, '?', 0, 1, 7, 0, },
273:
274: { &aha_driver, "tz", 8, 0, 0x0,0, 0, '?', 0, 1, 0, 0, },
275: { &aha_driver, "tz", 9, 0, 0x0,0, 0, '?', 0, 1, 1, 0, },
276: { &aha_driver, "tz", 10, 0, 0x0,0, 0, '?', 0, 1, 2, 0, },
277: { &aha_driver, "tz", 11, 0, 0x0,0, 0, '?', 0, 1, 3, 0, },
278: { &aha_driver, "tz", 12, 0, 0x0,0, 0, '?', 0, 1, 4, 0, },
279: { &aha_driver, "tz", 13, 0, 0x0,0, 0, '?', 0, 1, 5, 0, },
280: { &aha_driver, "tz", 14, 0, 0x0,0, 0, '?', 0, 1, 6, 0, },
281: { &aha_driver, "tz", 15, 0, 0x0,0, 0, '?', 0, 1, 7, 0, },
282: #endif /* NAHA > 1 */
283: #endif /* NAHA > 0 */
284:
285: #if NEAHA > 0
286: { &eaha_driver, "rz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
287: { &eaha_driver, "rz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
288: { &eaha_driver, "rz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
289: { &eaha_driver, "rz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
290: { &eaha_driver, "rz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
291: { &eaha_driver, "rz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
292: { &eaha_driver, "rz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
293: { &eaha_driver, "rz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
294:
295: { &eaha_driver, "tz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
296: { &eaha_driver, "tz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
297: { &eaha_driver, "tz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
298: { &eaha_driver, "tz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
299: { &eaha_driver, "tz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
300: { &eaha_driver, "tz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
301: { &eaha_driver, "tz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
302: { &eaha_driver, "tz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
303: #endif /* NEAHA > 0*/
304:
305: #if NFD > 0
306: {&fddriver, "fd", 0, fdintr, 0x3f2, 6, 0x3f2,
307: '?', 0, 0, 0, 0, 0, 0, SPL_FIVE, 6},
308: {&fddriver, "fd", 1, fdintr, 0x3f2, 6, 0x3f2,
309: '?', 0, 0, 1, 0, 0, 0, SPL_FIVE, 6},
310:
311: {&fddriver, "fd", 2, fdintr, 0x372, 6, 0x372,
312: '?', 0, 1, 0, 0, 0, 0, SPL_FIVE, 10},
313: {&fddriver, "fd", 3, fdintr, 0x372, 6, 0x372,
314: '?', 0, 1, 1, 0, 0, 0, SPL_FIVE, 10},
315: #endif /* NFD > 0 */
316:
317: #if NPC586 > 0
318: /* For MACH Default */
319: {&pcdriver, "pc", 0, pc586intr, 0xd0000, 0, 0xd0000,
320: '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 9},
321: /* For Factory Default */
322: {&pcdriver, "pc", 0, pc586intr, 0xc0000, 0, 0xc0000,
323: '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
324: /* For what Intel Ships */
325: {&pcdriver, "pc", 0, pc586intr, 0xf00000, 0, 0xf00000,
326: '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 12},
327: #endif /* NPC586 > 0 */
328:
329: #if NNE > 0
330: {&nedriver, "ne", 0, neintr, 0x280,0x4000,0xd0000,
331: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
332: {&nedriver, "ne", 1, neintr, 0x300,0x4000,0xd0000,
333: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 10},
334: #endif NNE > 0
335:
336: #if NNS8390 > 0
337: /* "wd" and "el" */
338: {&ns8390driver, "wd", 0, ns8390intr, 0x280,0x2000,0xd0000,
339: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
340: {&ns8390driver, "wd", 0, ns8390intr, 0x2a0,0x2000,0xd0000,
341: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
342: {&ns8390driver, "wd", 0, ns8390intr, 0x2e0,0x2000,0xd0000,
343: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
344: {&ns8390driver, "wd", 0, ns8390intr, 0x300,0x2000,0xd0000,
345: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
346: {&ns8390driver, "wd", 0, ns8390intr, 0x250,0x2000,0xd0000,
347: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
348: {&ns8390driver, "wd", 0, ns8390intr, 0x350,0x2000,0xd0000,
349: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
350: {&ns8390driver, "wd", 0, ns8390intr, 0x240,0x2000,0xd0000,
351: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 11},
352: {&ns8390driver, "wd", 1, ns8390intr, 0x340,0x2000,0xe8000,
353: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 15},
354: #endif /* NNS8390 > 0 */
355:
356: #if NAT3C501 > 0
357: {&at3c501driver, "et", 0, at3c501intr, 0x300, 0,0x300,
358: '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
359: #endif /* NAT3C501 > 0 */
360:
361: #if NUL > 0
362: {&uldriver, "ul", 0, ulintr, 0, 0, 0, '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 0},
363: {&uldriver, "ul", 1, ulintr, 0, 0, 0, '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 0},
364: #endif
365:
366: #if NWD > 0
367: {&wddriver, "wd", 0, wdintr, 0, 0, 0, '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
368: {&wddriver, "wd", 1, wdintr, 0, 0, 0, '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 15},
369: #endif
370:
371: #if NHPP > 0
372: {&hppdriver, "hpp", 0, hppintr, 0, 0, 0, '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 0},
373: {&hppdriver, "hpp", 1, hppintr, 0, 0, 0, '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 0},
374: #endif
375: #endif /* ! LINUX_DEV */
376:
377: #if NCOM > 0
378: {&comdriver, "com", 0, comintr, 0x3f8, 8, 0x3f8,
379: '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 4},
380: {&comdriver, "com", 1, comintr, 0x2f8, 8, 0x2f8,
381: '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 3},
382: {&comdriver, "com", 2, comintr, 0x3e8, 8, 0x3e8,
383: '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 5},
384: #endif /* NCOM > 0 */
385:
386: #ifndef LINUX_DEV
387: #if NLPR > 0
388: {&lprdriver, "lpr", 0, lprintr, 0x378, 3, 0x378,
389: '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
390: {&lprdriver, "lpr", 0, lprintr, 0x278, 3, 0x278,
391: '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
392: {&lprdriver, "lpr", 0, lprintr, 0x3bc, 3, 0x3bc,
393: '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
394: #endif /* NLPR > 0 */
395:
396: #if NWT > 0
397: {&wtdriver, "wt", 0, wtintr, 0x300, 2, 0x300,
398: '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
399: {&wtdriver, "wt", 0, wtintr, 0x288, 2, 0x288,
400: '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
401: {&wtdriver, "wt", 0, wtintr, 0x388, 2, 0x388,
402: '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
403: #endif /* NWT > 0 */
404: #endif /* ! LINUX_DEV */
405:
406: 0
407: };
408:
409: /*
410: * probeio:
411: *
412: * Probe and subsequently attach devices out on the AT bus.
413: *
414: *
415: */
416: void probeio(void)
417: {
418: register struct bus_device *device;
419: register struct bus_ctlr *master;
420: int i = 0;
421:
422: for (master = bus_master_init; master->driver; master++)
423: {
424: if (configure_bus_master(master->name, master->address,
425: master->phys_address, i, "atbus"))
426: i++;
427: }
428:
429: for (device = bus_device_init; device->driver; device++)
430: {
431: /* ignore what we (should) have found already */
432: if (device->alive || device->ctlr >= 0)
433: continue;
434: if (configure_bus_device(device->name, device->address,
435: device->phys_address, i, "atbus"))
436: i++;
437: }
438:
439: #if MACH_TTD
440: /*
441: * Initialize Remote kernel debugger.
442: */
443: ttd_init();
444: #endif /* MACH_TTD */
445: }
446:
447: void take_dev_irq(
448: struct bus_device *dev)
449: {
450: int pic = (int)dev->sysdep1;
451:
452: if (intpri[pic] == 0) {
453: iunit[pic] = dev->unit;
454: ivect[pic] = dev->intr;
455: intpri[pic] = (int)dev->sysdep;
456: form_pic_mask();
457: } else {
458: printf("The device below will clobber IRQ %d.\n", pic);
459: printf("You have two devices at the same IRQ.\n");
460: printf("This won't work. Reconfigure your hardware and try again.\n");
461: printf("%s%d: port = %x, spl = %d, pic = %d.\n",
462: dev->name, dev->unit, dev->address,
463: dev->sysdep, dev->sysdep1);
464: while (1);
465: }
466:
467: }
468:
469: void take_ctlr_irq(
470: struct bus_ctlr *ctlr)
471: {
472: int pic = ctlr->sysdep1;
473: if (intpri[pic] == 0) {
474: iunit[pic] = ctlr->unit;
475: ivect[pic] = ctlr->intr;
476: intpri[pic] = (int)ctlr->sysdep;
477: form_pic_mask();
478: } else {
479: printf("The device below will clobber IRQ %d.\n", pic);
480: printf("You have two devices at the same IRQ. This won't work.\n");
481: printf("Reconfigure your hardware and try again.\n");
482: while (1);
483: }
484: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.