xref: /netbsd/sys/arch/atari/atari/vectors.s (revision 6550d01e)
1/*	$NetBSD: vectors.s,v 1.22 2010/04/09 17:38:43 tsutsui Exp $	*/
2
3/*
4 * Copyright (c) 1990 Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 *    may be used to endorse or promote products derived from this software
17 *    without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 *	@(#)vectors.s	7.2 (Berkeley) 5/7/91
32 */
33/*
34 * Copyright (c) 1988 University of Utah
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
38 * are met:
39 * 1. Redistributions of source code must retain the above copyright
40 *    notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 *    notice, this list of conditions and the following disclaimer in the
43 *    documentation and/or other materials provided with the distribution.
44 * 3. All advertising materials mentioning features or use of this software
45 *    must display the following acknowledgement:
46 *	This product includes software developed by the University of
47 *	California, Berkeley and its contributors.
48 * 4. Neither the name of the University nor the names of its contributors
49 *    may be used to endorse or promote products derived from this software
50 *    without specific prior written permission.
51 *
52 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
53 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
56 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * SUCH DAMAGE.
63 *
64 *	@(#)vectors.s	7.2 (Berkeley) 5/7/91
65 */
66	.data
67GLOBAL(vectab)
68	.long	0x4ef80400	| 0: jmp 0x400:w (unused reset SSP)
69	.long	0		| 1: NOT USED (reset PC)
70	VECTOR(buserr)		| 2: bus error
71	VECTOR(addrerr)		| 3: address error
72	VECTOR(illinst)		| 4: illegal instruction
73	VECTOR(zerodiv)		| 5: zero divide
74	VECTOR(chkinst)		| 6: CHK instruction
75	VECTOR(trapvinst)	| 7: TRAPV instruction
76	VECTOR(privinst)	| 8: privilege violation
77	VECTOR(trace)		| 9: trace
78	VECTOR(illinst)		| 10: line 1010 emulator
79	VECTOR(fpfline)		| 11: line 1111 emulator
80	VECTOR(badtrap)		| 12: unassigned, reserved
81	VECTOR(coperr)		| 13: coprocessor protocol violation
82	VECTOR(fmterr)		| 14: format error
83	VECTOR(badtrap)		| 15: uninitialized interrupt vector
84	VECTOR(badtrap)		| 16: unassigned, reserved
85	VECTOR(badtrap)		| 17: unassigned, reserved
86	VECTOR(badtrap)		| 18: unassigned, reserved
87	VECTOR(badtrap)		| 19: unassigned, reserved
88	VECTOR(badtrap)		| 20: unassigned, reserved
89	VECTOR(badtrap)		| 21: unassigned, reserved
90	VECTOR(badtrap)		| 22: unassigned, reserved
91	VECTOR(badtrap)		| 23: unassigned, reserved
92	VECTOR(spurintr)	| 24: spurious interrupt
93
94GLOBAL(autovects)
95#ifdef _ATARIHW_
96	VECTOR(lev1intr)	| 25: level 1 interrupt autovector
97#else
98	VECTOR(badtrap)		| 25: Not supported by hardware
99#endif
100	VECTOR(lev2intr)	| 26: level 2 interrupt autovector
101	VECTOR(lev3intr)	| 27: level 3 interrupt autovector
102	VECTOR(lev4intr)	| 28: level 4 interrupt autovector
103	VECTOR(lev5intr)	| 29: level 5 interrupt autovector
104	VECTOR(lev6intr)	| 30: level 6 interrupt autovector
105	VECTOR(lev7intr)	| 31: level 7 interrupt autovector
106	VECTOR(trap0)		| 32: syscalls
107#ifdef COMPAT_13
108	VECTOR(trap1)		| 33: compat_13_sigreturn
109#else
110	VECTOR(illinst)		| 33: TRAP instruction vector
111#endif
112	VECTOR(trap2)		| 34: trace
113#ifdef COMPAT_16
114	VECTOR(trap3)		| 35: compat_16_sigreturn special syscall
115#else
116	VECTOR(illinst)
117#endif
118	VECTOR(illinst)		| 36: TRAP instruction vector
119	VECTOR(illinst)		| 37: TRAP instruction vector
120	VECTOR(illinst)		| 38: TRAP instruction vector
121	VECTOR(illinst)		| 39: TRAP instruction vector
122	VECTOR(illinst)		| 40: TRAP instruction vector
123	VECTOR(illinst)		| 41: TRAP instruction vector
124	VECTOR(illinst)		| 42: TRAP instruction vector
125	VECTOR(illinst)		| 43: TRAP instruction vector
126	VECTOR(trap12)		| 44: TRAP instruction vector
127	VECTOR(illinst)		| 45: TRAP instruction vector
128	VECTOR(illinst)		| 46: TRAP instruction vector
129	VECTOR(trap15)		| 47: TRAP instruction vector
130#ifdef FPSP
131	ASVECTOR(bsun)		| 48: FPCP branch/set on unordered cond
132	ASVECTOR(inex)		| 49: FPCP inexact result
133	ASVECTOR(dz)		| 50: FPCP divide by zero
134	ASVECTOR(unfl)		| 51: FPCP underflow
135	ASVECTOR(operr)		| 52: FPCP operand error
136	ASVECTOR(ovfl)		| 53: FPCP overflow
137	ASVECTOR(snan)		| 54: FPCP signalling NAN
138#else
139	VECTOR(fpfault)		| 48: FPCP branch/set on unordered cond
140	VECTOR(fpfault)		| 49: FPCP inexact result
141	VECTOR(fpfault)		| 50: FPCP divide by zero
142	VECTOR(fpfault)		| 51: FPCP underflow
143	VECTOR(fpfault)		| 52: FPCP operand error
144	VECTOR(fpfault)		| 53: FPCP overflow
145	VECTOR(fpfault)		| 54: FPCP signalling NAN
146#endif
147
148	VECTOR(fpunsupp)	| 55: FPCP unimplemented data type
149	VECTOR(badtrap)		| 56: unassigned, reserved
150	VECTOR(badtrap)		| 57: unassigned, reserved
151	VECTOR(badtrap)		| 58: unassigned, reserved
152	VECTOR(badtrap)		| 59: unassigned, reserved
153	VECTOR(badtrap)		| 60: unassigned, reserved
154	VECTOR(badtrap)		| 61: unassigned, reserved
155	VECTOR(badtrap)		| 62: unassigned, reserved
156	VECTOR(badtrap)		| 63: unassigned, reserved
157
158GLOBAL(uservects)
159	/*
160	 * MFP 1 auto vectors (ipl 6)
161	 */
162	VECTOR(intr_glue)	|  64: parallel port - BUSY
163	VECTOR(badmfpint)	|  65: modem port 1 - DCD
164	VECTOR(badmfpint)	|  66: modem port 1 - CTS
165	VECTOR(badmfpint)	|  67: ISA1 [ Hades only ]
166	VECTOR(badmfpint)	|  68: modem port 1 baudgen (Timer D)
167#ifdef STATCLOCK
168	ASVECTOR(mfp_timc)	|  69: Timer C {stat,prof}clock
169#else
170	VECTOR(badmfpint)	|  69: Timer C
171#endif /* STATCLOCK */
172#if NKBD > 0
173	ASVECTOR(mfp_kbd)	|  70: KBD/MIDI IRQ
174#else
175	VECTOR(badmfpint)	|  70:
176#endif /* NKBD > 0 */
177	VECTOR(intr_glue)	|  71: FDC/ACSI DMA
178	VECTOR(badmfpint)	|  72: Display enable counter
179	VECTOR(badmfpint)	|  73: modem port 1 - XMIT error
180	VECTOR(badmfpint)	|  74: modem port 1 - XMIT buffer empty
181	VECTOR(badmfpint)	|  75: modem port 1 - RCV error
182	VECTOR(badmfpint)	|  76: modem port 1 - RCV buffer full
183	ASVECTOR(mfp_tima)	|  77: Timer A (System clock)
184	VECTOR(badmfpint)	|  78: modem port 1 - RI
185	VECTOR(badmfpint)	|  79: Monochrome detect (ISA2 [ Hades only ])
186
187	/*
188	 * MFP 2 auto vectors (ipl 6)
189	 */
190	VECTOR(badmfpint)	|  80: I/O pin 1 J602
191	VECTOR(badmfpint)	|  81: I/O pin 3 J602
192	VECTOR(badmfpint)	|  82: SCC-DMA
193	VECTOR(badmfpint)	|  83: modem port 2 - RI
194	VECTOR(badmfpint)	|  84: serial port 1 baudgen (Timer D)
195	VECTOR(badmfpint)	|  85: TCCLC SCC (Timer C)
196	VECTOR(badmfpint)	|  86: FDC Drive Ready
197#if NNCRSCSI > 0
198	ASVECTOR(mfp2_5380dm)	|  87: SCSI DMA
199#else
200	VECTOR(badmfpint)	|  87:
201#endif /* NNCRSCSI > 0 */
202	VECTOR(badmfpint)	|  88: Display enable (Timer B)
203	VECTOR(badmfpint)	|  89: serial port 1 - XMIT error
204	VECTOR(badmfpint)	|  90: serial port 1 - XMIT buffer empty
205	VECTOR(badmfpint)	|  91: serial port 1 - RCV error
206	VECTOR(badmfpint)	|  92: serial port 1 - RCV buffer full
207	VECTOR(badmfpint)	|  93: Timer A
208	VECTOR(badmfpint)	|  94: RTC
209#if NNCRSCSI > 0
210	ASVECTOR(mfp2_5380)	|  95: SCSI 5380
211#else
212	VECTOR(badmfpint)	|  95:
213#endif /* NNCRSCSI > 0 */
214
215	/*
216	 * Interrupts from the 8530 SCC
217	 */
218	VECTOR(badtrap)		|  96: SCC Tx empty channel B
219	VECTOR(badtrap)		|  97: Not used
220	VECTOR(badtrap)		|  98: SCC Ext./Status Channel B
221	VECTOR(badtrap)		|  99: Not used
222	VECTOR(badtrap)		| 100: SCC Rx Channel B
223	VECTOR(badtrap)		| 101: Not used
224	VECTOR(badtrap)		| 102: SCC Special Rx cond.  Channel B
225	VECTOR(badtrap)		| 103: Not used
226	VECTOR(badtrap)		| 104: SCC Tx empty channel A
227	VECTOR(badtrap)		| 105: Not used
228	VECTOR(badtrap)		| 106: SCC Ext./Status Channel A
229	VECTOR(badtrap)		| 107: Not used
230	VECTOR(badtrap)		| 108: SCC Rx Channel A
231	VECTOR(badtrap)		| 109: Not used
232	VECTOR(badtrap)		| 110: SCC Special Rx cond.  Channel A
233	VECTOR(badtrap)		| 111: Not used
234
235#define BADTRAP16	VECTOR(badtrap) ; VECTOR(badtrap) ; \
236			VECTOR(badtrap) ; VECTOR(badtrap) ; \
237			VECTOR(badtrap) ; VECTOR(badtrap) ; \
238			VECTOR(badtrap) ; VECTOR(badtrap) ; \
239			VECTOR(badtrap) ; VECTOR(badtrap) ; \
240			VECTOR(badtrap) ; VECTOR(badtrap) ; \
241			VECTOR(badtrap) ; VECTOR(badtrap) ; \
242			VECTOR(badtrap) ; VECTOR(badtrap) ;
243	BADTRAP16		| 112-255: user interrupt vectors
244	BADTRAP16		| 112-255: user interrupt vectors
245	BADTRAP16		| 112-255: user interrupt vectors
246	BADTRAP16		| 112-255: user interrupt vectors
247	BADTRAP16		| 112-255: user interrupt vectors
248	BADTRAP16		| 112-255: user interrupt vectors
249	BADTRAP16		| 112-255: user interrupt vectors
250	BADTRAP16		| 112-255: user interrupt vectors
251	BADTRAP16		| 112-255: user interrupt vectors
252	BADTRAP16		| 112-255: user interrupt vectors
253