|
|
1.1 root 1: /*
2: * Interrupt vector routines
3: */
4:
5: #define SCBVEC(name) .align 2 \
6: .globl _X/**/name \
7: _X/**/name
8: #define PANIC(msg) clrl _waittime \
9: pushab 1f \
10: calls $1*4+4,_panic \
11: halt \
12: 1: .asciz msg
13: #define PRINTF(n,msg) pushab 1f; calls $(n+1)*4+4,_printf; MSG(msg)
14: #define MSG(msg) 1: .asciz msg
15: #define PUSHR pushl r5; pushl r4; pushl r3; pushl r2;\
16: pushl r1; pushl r0
17:
18: #define POPR movl (sp)+,r0 \
19: movl (sp)+,r1 \
20: movl (sp)+,r2 \
21: movl (sp)+,r3 \
22: movl (sp)+,r4 \
23: movl (sp)+,r5
24: /*
25: *unknown interrupt
26: */
27:
28: SCBVEC(unknown):
29: pushl $0
30: callf $8,_XTrap
31: halt
32: /*
33:
34: *powerfail
35: *psl & pc are saved on int stack.
36: *This routine saves general registers,memory mgmt registers,
37: *privileged registers, etc. in _dbuf & then executes halt.
38: *
39: *The restart location is saved at 0x00000c00. CPU 2 should
40: *restart at the location specified after power is up.
41:
42: */
43:
44: SCBVEC(powerfail):
45: pushl $1
46: callf $8,_XTrap
47: halt
48:
49:
50: /*
51: *interval timer
52: */
53:
54: SCBVEC(hardclock):
55: rei
56: /*
57: *console terminal receive interrupt
58: */
59:
60: SCBVEC(cnrint):
61: pushl $0xa
62: callf $8,_XTrap
63: halt
64: /*
65: *console terminal transmit interrupt
66: */
67:
68: SCBVEC(cnxint):
69: rei /* Just REI back !! */
70: /*
71: *software generated interrupts
72: */
73:
74: SCBVEC(s15):
75: pushl $0x10
76: callf $8,_XTrap
77: halt
78: /*
79: *software generated interrupts
80: */
81:
82: SCBVEC(s14):
83: pushl $0x11
84: callf $8,_XTrap
85: halt
86: /*
87: *software generated interrupts
88: */
89:
90: SCBVEC(s13):
91: pushl $0x12
92: callf $8,_XTrap
93: halt
94: /*
95: *software generated interrupts
96: */
97:
98: SCBVEC(s12):
99: pushl $0x13
100: callf $8,_XTrap
101: halt
102: /*
103: *software generated interrupts
104: */
105:
106: SCBVEC(s11):
107: pushl $0x14
108: callf $8,_XTrap
109: halt
110: /*
111: *software generated interrupts
112: */
113:
114: SCBVEC(s10):
115: pushl $0x15
116: callf $8,_XTrap
117: halt
118: /*
119: *software generated interrupts
120: */
121:
122: SCBVEC(s9):
123: pushl $0x16
124: callf $8,_XTrap
125: halt
126: /*
127: *software generated interrupts
128: */
129:
130: SCBVEC(s8):
131: pushl $0x17
132: callf $8,_XTrap
133: halt
134: /*
135: *software generated interrupts
136: */
137:
138: SCBVEC(s7):
139: pushl $0x18
140: callf $8,_XTrap
141: halt
142: /*
143: *software generated interrupts
144: */
145:
146: SCBVEC(s6):
147: pushl $0x19
148: callf $8,_XTrap
149: halt
150: /*
151: *software generated interrupts
152: */
153:
154: SCBVEC(s5):
155: pushl $0x1a
156: callf $8,_XTrap
157: halt
158: /*
159: *software generated interrupts
160: */
161:
162: SCBVEC(s4):
163: pushl $0x1b
164: callf $8,_XTrap
165: halt
166: /*
167: *software generated interrupts
168: */
169:
170: SCBVEC(s3):
171: pushl $0x1c
172: callf $8,_XTrap
173: halt
174: /*
175: *software generated interrupts
176: */
177:
178: SCBVEC(s2):
179: pushl $0x1d
180: callf $8,_XTrap
181: halt
182: /*
183: *software generated interrupts
184: */
185:
186: SCBVEC(s1):
187: pushl $0x1e
188: callf $8,_XTrap
189: halt
190:
191: /*
192: *io interrupt
193: */
194:
195: SCBVEC(iovec14):
196: halt
197: SCBVEC(iovec15):
198: halt
199: SCBVEC(iovec16):
200: halt
201: SCBVEC(iovec17):
202: halt
203:
204: /*
205: *EXCEPTIONS
206: */
207:
208: /*
209:
210: *buserror
211: *psl, pc, and errorcode are pushed onto int stack.
212: *ipl is raised to 0x1d.
213: *buserror could be due to:
214: *non-existent memory
215: *versabus timeout
216: *uncorrectable memory
217: *versabus error (BERR)
218: *versabus parity error
219:
220: */
221: SCBVEC(buserror):
222: pushl $0x20
223: callf $8,_XTrap
224: halt
225:
226: /*
227: *kernel stack not valid
228: *happens only during the initiation of another exception or
229: *interrupt.The process must be aborted.
230: *pc & psl are pushed onto INTSTACK.
231: * IPL is raised to 0x1f.
232: *this routine calls _panic routine written in C which prints
233: *the message & waits for the operator action.
234: */
235:
236: SCBVEC(kspnotval):
237: pushl $0x31
238: callf $8,_XTrap
239: halt
240: /*
241: * Trap and fault vector routines
242: */
243: #define TRAP(a) pushl $a; brw alltraps
244:
245: SCBVEC(prvinflt):
246: pushl $0x2c
247: callf $8,_XTrap
248: halt
249: SCBVEC(resopflt):
250: pushl $0x2d
251: callf $8,_XTrap
252: halt
253: SCBVEC(resadflt):
254: pushl $0x2e
255: callf $8,_XTrap
256: halt
257: SCBVEC(bptflt):
258: pushl $0x33
259: callf $8,_XTrap
260: halt
261: SCBVEC(tracep):
262: pushl $0x32
263: callf $8,_XTrap
264: halt
265: SCBVEC(arithtrap):
266: pushl $0x34
267: callf $8,_XTrap
268: halt
269: SCBVEC(protflt): /*access control violation*/
270: pushl $0x2f
271: callf $8,_XTrap
272: halt
273: SCBVEC(transflt):
274: pushl $0x30
275: callf $8,_XTrap
276: halt
277: SCBVEC(alignflt):
278: pushl $0x35
279: callf $8,_XTrap
280: halt
281:
282: alltraps:
283: halt
284:
285: SCBVEC(kcall): /*kcall*/
286: pushl $0x2b
287: callf $8,_XTrap
288: halt
289:
290:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.