|
|
1.1 root 1: /*
2: * Interrupt vector routines
3: */
4:
5: /*******************************************************************
6: *
7: * 9-April-85 JJM added clear ACC to RESOP & OVFL faults
8: * 30-April-85 JJM removed clear ACC stuff do to arch. change
9: *
10: *******************************************************************/
11:
12: #define SCBVEC(name) .align 2 \
13: .globl _X/**/name \
14: _X/**/name
15:
16:
17: #define PANIC(msg) clrl _waittime \
18: pushab 1f \
19: calls $1*4+4,_panic \
20: halt \
21: 1: .asciz msg
22:
23: #define PRINTF(n,msg) pushab 1f; calls $(n+1)*4+4,_printf; MSG(msg)
24: #define MSG(msg) 1: .asciz msg
25:
26: #define PUSHR pushl r5; pushl r4; pushl r3; pushl r2;\
27: pushl r1; pushl r0
28:
29: #define POPR movl (sp)+,r0 \
30: movl (sp)+,r1 \
31: movl (sp)+,r2 \
32: movl (sp)+,r3 \
33: movl (sp)+,r4 \
34: movl (sp)+,r5
35: /*
36: *unknown interrupt
37: */
38:
39: SCBVEC(unknown):
40: pushl $0
41: callf $8,_XTrap
42: halt
43: /*
44:
45: *powerfail
46: *psl & pc are saved on int stack.
47: *This routine saves general registers,memory mgmt registers,
48: *privileged registers, etc. in _dbuf & then executes halt.
49: *
50: *The restart location is saved at 0x00000c00. CPU 2 should
51: *restart at the location specified after power is up.
52:
53: */
54:
55: SCBVEC(powerfail):
56: pushl $1
57: callf $8,_XTrap
58: halt
59:
60:
61: /*
62: *interval timer
63: */
64:
65: SCBVEC(hardclock):
66: incl _clock_event /* set the diagnostic clock occurred flag */
67: rei
68:
69: /*
70: *console terminal receive interrupt
71: */
72:
73: SCBVEC(cnrint):
74: pushl $0xa
75: callf $8,_XTrap
76: halt
77: /*
78: *console terminal transmit interrupt
79: */
80:
81: SCBVEC(cnxint):
82: rei /* Just REI back !! */
83: /*
84: *software generated interrupts
85: */
86:
87: SCBVEC(s15):
88: pushl $0x10
89: callf $8,_XTrap
90: halt
91: /*
92: *software generated interrupts
93: */
94:
95: SCBVEC(s14):
96: pushl $0x11
97: callf $8,_XTrap
98: halt
99: /*
100: *software generated interrupts
101: */
102:
103: SCBVEC(s13):
104: pushl $0x12
105: callf $8,_XTrap
106: halt
107: /*
108: *software generated interrupts
109: */
110:
111: SCBVEC(s12):
112: pushl $0x13
113: callf $8,_XTrap
114: halt
115: /*
116: *software generated interrupts
117: */
118:
119: SCBVEC(s11):
120: pushl $0x14
121: callf $8,_XTrap
122: halt
123: /*
124: *software generated interrupts
125: */
126:
127: SCBVEC(s10):
128: pushl $0x15
129: callf $8,_XTrap
130: halt
131: /*
132: *software generated interrupts
133: */
134:
135: SCBVEC(s9):
136: pushl $0x16
137: callf $8,_XTrap
138: halt
139: /*
140: *software generated interrupts
141: */
142:
143: SCBVEC(s8):
144: pushl $0x17
145: callf $8,_XTrap
146: halt
147: /*
148: *software generated interrupts
149: */
150:
151: SCBVEC(s7):
152: pushl $0x18
153: callf $8,_XTrap
154: halt
155: /*
156: *software generated interrupts
157: */
158:
159: SCBVEC(s6):
160: pushl $0x19
161: callf $8,_XTrap
162: halt
163: /*
164: *software generated interrupts
165: */
166:
167: SCBVEC(s5):
168: pushl $0x1a
169: callf $8,_XTrap
170: halt
171: /*
172: *software generated interrupts
173: */
174:
175: SCBVEC(s4):
176: pushl $0x1b
177: callf $8,_XTrap
178: halt
179: /*
180: *software generated interrupts
181: */
182:
183: SCBVEC(s3):
184: pushl $0x1c
185: callf $8,_XTrap
186: halt
187: /*
188: *software generated interrupts
189: */
190:
191: SCBVEC(s2):
192: pushl $0x1d
193: callf $8,_XTrap
194: halt
195: /*
196: *software generated interrupts
197: */
198:
199: SCBVEC(s1):
200: pushl $0x1e
201: callf $8,_XTrap
202: halt
203:
204: /*
205: *io interrupt
206: */
207:
208: SCBVEC(iovec14):
209: halt
210: SCBVEC(iovec15):
211: halt
212: SCBVEC(iovec16):
213: halt
214: SCBVEC(iovec17):
215: halt
216:
217: /*
218: *EXCEPTIONS
219: */
220:
221: /*
222:
223: *buserror
224: *psl, pc, and errorcode are pushed onto int stack.
225: *ipl is raised to 0x1d.
226: *buserror could be due to:
227: *non-existent memory
228: *versabus timeout
229: *uncorrectable memory
230: *versabus error (BERR)
231: *versabus parity error
232:
233: */
234: SCBVEC(buserror):
235: pushl $0x20
236: callf $8,_XTrap
237: halt
238:
239: /*
240: *kernel stack not valid
241: *happens only during the initiation of another exception or
242: *interrupt.The process must be aborted.
243: *pc & psl are pushed onto INTSTACK.
244: * IPL is raised to 0x1f.
245: *this routine calls _panic routine written in C which prints
246: *the message & waits for the operator action.
247: */
248:
249: SCBVEC(kspnotval):
250: pushl $0x31
251: callf $8,_XTrap
252: halt
253: /*
254: * Trap and fault vector routines
255: */
256: #define TRAP(a) pushl $a; brw alltraps
257:
258: SCBVEC(prvinflt):
259: movpsl _psl_val /* save the psl */
260: mtpr $0x1f,$IPL /* set the IPL to high */
261: bitl $PSL_DBL,_psl_val /* check for DBL Acc. */
262: beql 1f
263: std _post_evt_acc /* save the DBL Acc. */
264: brb 2f
265: 1: stf _post_evt_acc /* save the SGL Acc. */
266: 2: storer $0x1fff,_store_regs /* store regs 0 - 12 */
267: moval (r13),_post_event_fp /* save the frame pointer */
268: moval (r14),_post_event_sp /* save the stack pointer */
269: pushl $0x2c
270: callf $8,_XTrap
271: halt
272:
273: /*********************************************************************
274: * THE RESERVED OPERAND FAULT HANDLER
275: * On a Reserved Operand Fault we'll save the PSL, the accumulator,
276: * and the register values and then go to the fpp's event routine.
277: *********************************************************************/
278: SCBVEC(resopflt):
279: mtpr $0x1f,$IPL
280: movpsl _psl_val /* get the current PSL */
281: bitl $PSL_DBL,_psl_val /* check for DBL Acc. */
282: beql 1f
283: std _post_evt_acc /* save the DBL Accumulator */
284: brw 2f
285: 1: stf _post_evt_acc /* save the SGL Accumulator */
286: clrl _post_evt_acc+4
287: 2:
288: storer $0x1fff,_store_regs /* store regs 0 - 12 */
289: moval (r13),_post_event_fp /* save the frame pointer */
290: moval (r14),_post_event_sp /* save the stack pointer */
291: pushl $0x2d
292: callf $8,_XTrap
293: halt
294:
295:
296: SCBVEC(resadflt):
297: movpsl _psl_val /* save the psl */
298: mtpr $0x1f,$IPL /* set the IPL to high */
299: bitl $PSL_DBL,_psl_val /* check for DBL Acc. */
300: beql 1f
301: std _post_evt_acc /* save the DBL Acc. */
302: brb 2f
303: 1: stf _post_evt_acc /* save the SGL Acc. */
304: 2: storer $0x1fff,_store_regs /* store regs 0 - 12 */
305: moval (r13),_post_event_fp /* save the frame pointer */
306: moval (r14),_post_event_sp /* save the stack pointer */
307: pushl $0x2e
308: callf $8,_XTrap
309: halt
310:
311: SCBVEC(bptflt):
312: pushl $0x33
313: callf $8,_XTrap
314: halt
315:
316: SCBVEC(tracep):
317: movpsl _psl_val /* save the psl */
318: mtpr $0x1f,$IPL /* set the IPL to high */
319: bitl $PSL_DBL,_psl_val /* check for DBL Acc. */
320: beql 1f
321: std _post_evt_acc /* save the DBL Acc. */
322: brb 2f
323: 1: stf _post_evt_acc /* save the SGL Acc. */
324: 2: storer $0x1fff,_store_regs /* store regs 0 - 12 */
325: pushl $0x32
326: callf $8,_XTrap
327: halt
328:
329: /*********************************************************************
330: * THE ARITHMETIC TRAP HANDLER
331: * On an Overflow Fault we'll save the PSL, the accumulator, and the
332: * register values and then go to the fpp event routine.
333: *********************************************************************/
334: SCBVEC(arithtrap):
335: mtpr $0x1f,$IPL
336: movpsl _psl_val /* get the current PSL */
337: bitl $PSL_DBL,_psl_val /* check for DBL Acc. */
338: beql 1f
339: std _post_evt_acc /* save the DBL Accumulator */
340: brw 2f
341: 1:
342: stf _post_evt_acc /* save the SGL Accumulator */
343: clrl _post_evt_acc+4
344: 2:
345: storer $0x1fff,_store_regs /* store regs 0 - 12 */
346: moval (r13),_post_event_fp /* save the frame pointer */
347: moval (r14),_post_event_sp /* save the stack pointer */
348: pushl $0x34
349: callf $8,_XTrap
350: halt
351:
352:
353: SCBVEC(protflt): /*access control violation*/
354: movpsl _psl_val /* save the psl */
355: moval (r14),_post_event_sp /* save the stack pointer */
356: pushl $0x2f
357: callf $8,_XTrap
358: halt
359: SCBVEC(transflt):
360: pushl $0x30
361: callf $8,_XTrap
362: halt
363: SCBVEC(alignflt):
364: movpsl _psl_val /* save the psl */
365: mtpr $0x1f,$IPL /* set the IPL to high */
366: bitl $PSL_DBL,_psl_val /* check for DBL Acc. */
367: beql 1f
368: std _post_evt_acc /* save the DBL Acc. */
369: brb 2f
370: 1: stf _post_evt_acc /* save the SGL Acc. */
371: 2: storer $0x1fff,_store_regs /* store regs 0 - 12 */
372: pushl $0x35
373: callf $8,_XTrap
374: halt
375: SCBVEC(fpp_emulate): /* fpp emulation trap */
376: movpsl _psl_val /* save the psl */
377: storer $0x1fff,_store_regs /* store regs 0 - 12 */
378: moval (r13),_post_event_fp /* save the frame pointer */
379: moval (r14),_post_event_sp /* save the stack pointer */
380: pushl $0x37
381: callf $8,_XTrap
382: halt
383:
384: alltraps:
385: halt
386:
387: SCBVEC(kcall): /*kcall*/
388: pushl $0x2b
389: callf $8,_XTrap
390: halt
391:
392:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.