1 /*
2 * Mach Operating System
3 * Copyright (c) 1991 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 Software.Distribution@CS.CMU.EDU
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 * Copyright 1988, 1989, 1990, 1991 by Intel Corporation,
28 * Santa Clara, California.
29 *
30 * All Rights Reserved
31 *
32 * Permission to use, copy, modify, and distribute this software and its
33 * documentation for any purpose and without fee is hereby granted,
34 * provided that the above copyright notice appears in all copies and that
35 * both the copyright notice and this permission notice appear in
36 * supporting documentation, and that the name of Intel not be used in
37 * advertising or publicity pertaining to distribution of the software
38 * without specific, written prior permission.
39 *
40 * INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
41 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
42 * SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
43 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
44 * PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS
45 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
46 * THIS SOFTWARE.
47 */
48 /*
49 * HISTORY
50 * $Log: pic_ipsc.c,v $
51 * Revision 2.6 91/08/03 18:18:10 jsb
52 * Added cnpintr.
53 * [91/07/17 13:59:08 jsb]
54 *
55 * Revision 2.5 91/07/31 17:43:17 dbg
56 * Changed hardclock for stack_switching support.
57 * [91/07/29 dbg]
58 *
59 * Revision 2.4 91/06/18 20:50:26 jsb
60 * New copyright from Intel.
61 * [91/06/18 20:07:09 jsb]
62 *
63 * Revision 2.3 91/06/06 17:04:53 jsb
64 * Hang cnppoll off of hardclock (since cnp doesn't get interrupts).
65 * [91/05/13 17:09:57 jsb]
66 *
67 * Revision 2.2 90/12/04 14:47:32 jsb
68 * First checkin.
69 * [90/12/04 10:57:23 jsb]
70 *
71 */
72
73 #include "cnp.h"
74
75 #include <sys/types.h>
76 #include <i386/ipl.h>
77 #include <i386/pic.h>
78
79 #if NCNP > 0
80 #define hardclock fakehardclock
81 extern int cnpintr();
82 #endif NCNP > 0
83
84 /* These interrupts are always present */
85 extern intnull(), hardclock();
86 extern dcm_send_intr(), dcm_recv_intr(), usmintr(), sdintr();
87
88 int (*ivect[NINTR])() = {
89 /*00*/ intnull, /* parity error */
90 /*01*/ intnull, /* bus timeout */
91 /*02*/ hardclock, /* timer 0 */
92 /*03*/ dcm_send_intr, /* EOD 0, DCM send */
93 /*04*/ intnull, /* EOD 1 not used */
94 /*05*/ intnull, /* DCM error */
95 /*06*/ intnull, /* grounded */
96 /*07*/ intnull, /* slave interrupt */
97 /*08*/ dcm_recv_intr, /* EOD 2, DCM receive */
98 /*09*/ intnull, /* EOD 3, not used */
99 /*10*/ intnull, /* timer 2 */
100 /*11*/ intnull, /* timer 1 */
101 /*12*/ usmintr, /* serial port */
102 /*13*/ cnpintr, /* cnp ethernet */
103 /*14*/ sdintr, /* SX/SCSI interrupt */
104 /*15*/ intnull, /* ??? */
105 };
106
107 u_char intpri[NINTR] = {
108 /* 00 */ 0, 0, SPLHI, SPL5,
109 /* 04 */ 0, 0, 0, 0,
110 /* 08 */ SPL5, 0, 0, 0,
111 /* 12 */ SPLTTY, SPLHI, SPL5, 0,
112 };
113
114 #if NCNP > 0
115 #include <i386/thread.h>
116
117 hardclock(ivect, old_ipl, ret_addr, regs)
118 int ivect;
119 int old_ipl;
120 char *ret_addr;
121 struct i386_saved_state regs;
122 {
123 #undef hardclock
124 hardclock(ivect, old_ipl, ret_addr, regs);
125 cnppoll();
126 }
127 #endif NCNP > 0
Cache object: 244591d9da11e288ba416958264bf4b4
|