blob: ba576fef3c977eac03fb46ab737caddff4983145 [file] [log] [blame]
wdenk2262cfe2002-11-18 00:14:45 +00001/*
Graeme Russdbf71152011-04-13 19:43:26 +10002 * (C) Copyright 2008-2011
3 * Graeme Russ, <graeme.russ@gmail.com>
Graeme Russ564a9982009-11-24 20:04:18 +11004 *
wdenk2262cfe2002-11-18 00:14:45 +00005 * (C) Copyright 2002
Albert ARIBAUDfa82f872011-08-04 18:45:45 +02006 * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
wdenk2262cfe2002-11-18 00:14:45 +00007 *
Graeme Russ433ff2b2010-04-24 00:05:38 +10008 * Portions of this file are derived from the Linux kernel source
9 * Copyright (C) 1991, 1992 Linus Torvalds
10 *
Wolfgang Denk1a459662013-07-08 09:37:19 +020011 * SPDX-License-Identifier: GPL-2.0+
wdenk2262cfe2002-11-18 00:14:45 +000012 */
13
14#include <common.h>
Simon Glass12d69292016-01-19 21:32:26 -070015#include <dm.h>
Stefan Reinauer095593c2012-12-02 04:49:50 +000016#include <asm/control_regs.h>
Bin Menge2126712016-05-22 01:45:33 -070017#include <asm/i8259.h>
Graeme Russ9933d602008-12-07 10:29:01 +110018#include <asm/interrupt.h>
Graeme Russca56a4c2011-02-12 15:11:28 +110019#include <asm/io.h>
Bin Menge2126712016-05-22 01:45:33 -070020#include <asm/lapic.h>
Bin Menge2126712016-05-22 01:45:33 -070021#include <asm/processor-flags.h>
wdenk2262cfe2002-11-18 00:14:45 +000022
Simon Glass7282d832013-04-17 16:13:33 +000023DECLARE_GLOBAL_DATA_PTR;
24
Graeme Russ564a9982009-11-24 20:04:18 +110025#define DECLARE_INTERRUPT(x) \
26 ".globl irq_"#x"\n" \
Graeme Russ0fc1b492009-11-24 20:04:19 +110027 ".hidden irq_"#x"\n" \
28 ".type irq_"#x", @function\n" \
Graeme Russ564a9982009-11-24 20:04:18 +110029 "irq_"#x":\n" \
Graeme Russ564a9982009-11-24 20:04:18 +110030 "pushl $"#x"\n" \
J. Tang3c03f492017-02-09 21:54:13 -050031 "jmp.d32 irq_common_entry\n"
wdenk2262cfe2002-11-18 00:14:45 +000032
Bin Meng3ccd49c2015-07-10 10:51:23 +080033static char *exceptions[] = {
34 "Divide Error",
35 "Debug",
36 "NMI Interrupt",
37 "Breakpoint",
38 "Overflow",
39 "BOUND Range Exceeded",
40 "Invalid Opcode (Undefined Opcode)",
41 "Device Not Avaiable (No Math Coprocessor)",
42 "Double Fault",
43 "Coprocessor Segment Overrun",
44 "Invalid TSS",
45 "Segment Not Present",
46 "Stack Segment Fault",
Simon Glass8aba36d2015-07-31 09:31:32 -060047 "General Protection",
Bin Meng3ccd49c2015-07-10 10:51:23 +080048 "Page Fault",
49 "Reserved",
50 "x87 FPU Floating-Point Error",
51 "Alignment Check",
52 "Machine Check",
53 "SIMD Floating-Point Exception",
54 "Virtualization Exception",
55 "Reserved",
56 "Reserved",
57 "Reserved",
58 "Reserved",
59 "Reserved",
60 "Reserved",
61 "Reserved",
62 "Reserved",
63 "Reserved",
64 "Reserved",
65 "Reserved"
66};
67
Simon Glasse1ffd812014-11-06 13:20:08 -070068static void dump_regs(struct irq_regs *regs)
Graeme Russ433ff2b2010-04-24 00:05:38 +100069{
Bin Meng013cf482015-07-10 10:38:32 +080070 unsigned long cs, eip, eflags;
Graeme Russ433ff2b2010-04-24 00:05:38 +100071 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
72 unsigned long d0, d1, d2, d3, d6, d7;
Graeme Russca56a4c2011-02-12 15:11:28 +110073 unsigned long sp;
Graeme Russ433ff2b2010-04-24 00:05:38 +100074
Bin Meng013cf482015-07-10 10:38:32 +080075 /*
76 * Some exceptions cause an error code to be saved on the current stack
77 * after the EIP value. We should extract CS/EIP/EFLAGS from different
78 * position on the stack based on the exception number.
79 */
80 switch (regs->irq_id) {
81 case EXC_DF:
82 case EXC_TS:
83 case EXC_NP:
84 case EXC_SS:
85 case EXC_GP:
86 case EXC_PF:
87 case EXC_AC:
88 cs = regs->context.ctx2.xcs;
89 eip = regs->context.ctx2.eip;
90 eflags = regs->context.ctx2.eflags;
91 /* We should fix up the ESP due to error code */
92 regs->esp += 4;
93 break;
94 default:
95 cs = regs->context.ctx1.xcs;
96 eip = regs->context.ctx1.eip;
97 eflags = regs->context.ctx1.eflags;
98 break;
99 }
100
Graeme Russ433ff2b2010-04-24 00:05:38 +1000101 printf("EIP: %04x:[<%08lx>] EFLAGS: %08lx\n",
Bin Meng013cf482015-07-10 10:38:32 +0800102 (u16)cs, eip, eflags);
Simon Glass73995152015-08-10 22:02:54 -0600103 if (gd->flags & GD_FLG_RELOC)
104 printf("Original EIP :[<%08lx>]\n", eip - gd->reloc_off);
Graeme Russ433ff2b2010-04-24 00:05:38 +1000105
106 printf("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
107 regs->eax, regs->ebx, regs->ecx, regs->edx);
108 printf("ESI: %08lx EDI: %08lx EBP: %08lx ESP: %08lx\n",
109 regs->esi, regs->edi, regs->ebp, regs->esp);
110 printf(" DS: %04x ES: %04x FS: %04x GS: %04x SS: %04x\n",
Graeme Russ717979f2011-11-08 02:33:13 +0000111 (u16)regs->xds, (u16)regs->xes, (u16)regs->xfs,
112 (u16)regs->xgs, (u16)regs->xss);
Graeme Russ433ff2b2010-04-24 00:05:38 +1000113
114 cr0 = read_cr0();
115 cr2 = read_cr2();
116 cr3 = read_cr3();
117 cr4 = read_cr4();
118
119 printf("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n",
120 cr0, cr2, cr3, cr4);
121
122 d0 = get_debugreg(0);
123 d1 = get_debugreg(1);
124 d2 = get_debugreg(2);
125 d3 = get_debugreg(3);
126
127 printf("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n",
128 d0, d1, d2, d3);
129
130 d6 = get_debugreg(6);
131 d7 = get_debugreg(7);
132 printf("DR6: %08lx DR7: %08lx\n",
133 d6, d7);
Graeme Russca56a4c2011-02-12 15:11:28 +1100134
135 printf("Stack:\n");
136 sp = regs->esp;
137
138 sp += 64;
139
140 while (sp > (regs->esp - 16)) {
141 if (sp == regs->esp)
142 printf("--->");
143 else
144 printf(" ");
145 printf("0x%8.8lx : 0x%8.8lx\n", sp, (ulong)readl(sp));
146 sp -= 4;
147 }
Graeme Russ433ff2b2010-04-24 00:05:38 +1000148}
149
Bin Meng3ccd49c2015-07-10 10:51:23 +0800150static void do_exception(struct irq_regs *regs)
151{
152 printf("%s\n", exceptions[regs->irq_id]);
153 dump_regs(regs);
154 hang();
155}
156
wdenk2262cfe2002-11-18 00:14:45 +0000157struct idt_entry {
158 u16 base_low;
159 u16 selector;
160 u8 res;
161 u8 access;
162 u16 base_high;
Graeme Russ717979f2011-11-08 02:33:13 +0000163} __packed;
wdenk2262cfe2002-11-18 00:14:45 +0000164
Graeme Russ564a9982009-11-24 20:04:18 +1100165struct desc_ptr {
166 unsigned short size;
167 unsigned long address;
Graeme Russ717979f2011-11-08 02:33:13 +0000168} __packed;
wdenk2262cfe2002-11-18 00:14:45 +0000169
Graeme Russ58c7a672011-12-19 14:26:18 +1100170struct idt_entry idt[256] __aligned(16);
wdenk2262cfe2002-11-18 00:14:45 +0000171
Graeme Russ564a9982009-11-24 20:04:18 +1100172struct desc_ptr idt_ptr;
wdenk2262cfe2002-11-18 00:14:45 +0000173
Graeme Russ564a9982009-11-24 20:04:18 +1100174static inline void load_idt(const struct desc_ptr *dtr)
175{
Graeme Russ717979f2011-11-08 02:33:13 +0000176 asm volatile("cs lidt %0" : : "m" (*dtr));
Graeme Russ564a9982009-11-24 20:04:18 +1100177}
wdenk2262cfe2002-11-18 00:14:45 +0000178
Graeme Russabf0cd32009-02-24 21:13:40 +1100179void set_vector(u8 intnum, void *routine)
wdenk2262cfe2002-11-18 00:14:45 +0000180{
Simon Glass21b3b662016-09-25 21:33:25 -0600181 idt[intnum].base_high = (u16)((ulong)(routine) >> 16);
182 idt[intnum].base_low = (u16)((ulong)(routine) & 0xffff);
wdenk2262cfe2002-11-18 00:14:45 +0000183}
184
Graeme Russ717979f2011-11-08 02:33:13 +0000185/*
186 * Ideally these would be defined static to avoid a checkpatch warning, but
187 * the compiler cannot see them in the inline asm and complains that they
188 * aren't defined
189 */
Graeme Russ564a9982009-11-24 20:04:18 +1100190void irq_0(void);
191void irq_1(void);
wdenk2262cfe2002-11-18 00:14:45 +0000192
Graeme Russabf0cd32009-02-24 21:13:40 +1100193int cpu_init_interrupts(void)
wdenk2262cfe2002-11-18 00:14:45 +0000194{
195 int i;
wdenk8bde7f72003-06-27 21:31:46 +0000196
Graeme Russ564a9982009-11-24 20:04:18 +1100197 int irq_entry_size = irq_1 - irq_0;
198 void *irq_entry = (void *)irq_0;
199
wdenk2262cfe2002-11-18 00:14:45 +0000200 /* Setup the IDT */
Graeme Russ717979f2011-11-08 02:33:13 +0000201 for (i = 0; i < 256; i++) {
wdenk2262cfe2002-11-18 00:14:45 +0000202 idt[i].access = 0x8e;
wdenk8bde7f72003-06-27 21:31:46 +0000203 idt[i].res = 0;
Simon Glass8aba36d2015-07-31 09:31:32 -0600204 idt[i].selector = X86_GDT_ENTRY_32BIT_CS * X86_GDT_ENTRY_SIZE;
Graeme Russ564a9982009-11-24 20:04:18 +1100205 set_vector(i, irq_entry);
206 irq_entry += irq_entry_size;
wdenk8bde7f72003-06-27 21:31:46 +0000207 }
208
Simon Glass8aba36d2015-07-31 09:31:32 -0600209 idt_ptr.size = 256 * 8 - 1;
Graeme Russ564a9982009-11-24 20:04:18 +1100210 idt_ptr.address = (unsigned long) idt;
Graeme Russ564a9982009-11-24 20:04:18 +1100211
212 load_idt(&idt_ptr);
wdenk8bde7f72003-06-27 21:31:46 +0000213
wdenk2262cfe2002-11-18 00:14:45 +0000214 return 0;
215}
216
Simon Glass6f41e0e7b2015-04-28 20:25:16 -0600217void *x86_get_idt(void)
218{
219 return &idt_ptr;
220}
221
Graeme Russ564a9982009-11-24 20:04:18 +1100222void __do_irq(int irq)
223{
224 printf("Unhandled IRQ : %d\n", irq);
225}
226void do_irq(int irq) __attribute__((weak, alias("__do_irq")));
227
wdenk2262cfe2002-11-18 00:14:45 +0000228void enable_interrupts(void)
229{
230 asm("sti\n");
231}
232
233int disable_interrupts(void)
234{
235 long flags;
wdenk8bde7f72003-06-27 21:31:46 +0000236
Simon Glass34722da2017-01-16 07:04:00 -0700237#if CONFIG_IS_ENABLED(X86_64)
Simon Glass35233da2016-09-25 21:33:23 -0600238 asm volatile ("pushfq ; popq %0 ; cli\n" : "=g" (flags) : );
239#else
wdenk2262cfe2002-11-18 00:14:45 +0000240 asm volatile ("pushfl ; popl %0 ; cli\n" : "=g" (flags) : );
Simon Glass35233da2016-09-25 21:33:23 -0600241#endif
Graeme Russ717979f2011-11-08 02:33:13 +0000242 return flags & X86_EFLAGS_IF;
wdenk2262cfe2002-11-18 00:14:45 +0000243}
Graeme Russ564a9982009-11-24 20:04:18 +1100244
Bin Meng1dae2e02014-11-20 16:11:16 +0800245int interrupt_init(void)
246{
Simon Glass12d69292016-01-19 21:32:26 -0700247 struct udevice *dev;
248 int ret;
249
250 /* Try to set up the interrupt router, but don't require one */
Simon Glass3f603cb2016-02-11 13:23:26 -0700251 ret = uclass_first_device_err(UCLASS_IRQ, &dev);
Simon Glass12d69292016-01-19 21:32:26 -0700252 if (ret && ret != -ENODEV)
253 return ret;
254
Ben Stoltz3dcdd172015-08-04 12:33:46 -0600255 /*
256 * When running as an EFI application we are not in control of
257 * interrupts and should leave them alone.
258 */
259#ifndef CONFIG_EFI_APP
Bin Meng1dae2e02014-11-20 16:11:16 +0800260 /* Just in case... */
261 disable_interrupts();
262
Bin Mengda3fe242015-10-22 19:13:30 -0700263#ifdef CONFIG_I8259_PIC
Bin Meng1dae2e02014-11-20 16:11:16 +0800264 /* Initialize the master/slave i8259 pic */
265 i8259_init();
266#endif
267
Bin Menge2126712016-05-22 01:45:33 -0700268 lapic_setup();
269
Bin Meng1dae2e02014-11-20 16:11:16 +0800270 /* Initialize core interrupt and exception functionality of CPU */
271 cpu_init_interrupts();
272
Simon Glasse49ccea2015-08-04 12:34:00 -0600273 /*
274 * It is now safe to enable interrupts.
275 *
276 * TODO(sjg@chromium.org): But we don't handle these correctly when
277 * booted from EFI.
278 */
279 if (ll_boot_init())
280 enable_interrupts();
Ben Stoltz3dcdd172015-08-04 12:33:46 -0600281#endif
Bin Meng1dae2e02014-11-20 16:11:16 +0800282
283 return 0;
284}
285
Graeme Russ564a9982009-11-24 20:04:18 +1100286/* IRQ Low-Level Service Routine */
Graeme Russ7228efa2010-10-07 20:03:23 +1100287void irq_llsr(struct irq_regs *regs)
Graeme Russ564a9982009-11-24 20:04:18 +1100288{
289 /*
290 * For detailed description of each exception, refer to:
Albert ARIBAUDfa82f872011-08-04 18:45:45 +0200291 * Intel® 64 and IA-32 Architectures Software Developer's Manual
Graeme Russ564a9982009-11-24 20:04:18 +1100292 * Volume 1: Basic Architecture
293 * Order Number: 253665-029US, November 2008
294 * Table 6-1. Exceptions and Interrupts
295 */
Bin Meng3ccd49c2015-07-10 10:51:23 +0800296 if (regs->irq_id < 32) {
297 /* Architecture defined exception */
298 do_exception(regs);
299 } else {
Graeme Russ564a9982009-11-24 20:04:18 +1100300 /* Hardware or User IRQ */
Graeme Russ7228efa2010-10-07 20:03:23 +1100301 do_irq(regs->irq_id);
Graeme Russ564a9982009-11-24 20:04:18 +1100302 }
303}
304
305/*
306 * OK - This looks really horrible, but it serves a purpose - It helps create
307 * fully relocatable code.
308 * - The call to irq_llsr will be a relative jump
309 * - The IRQ entries will be guaranteed to be in order
Graeme Russ433ff2b2010-04-24 00:05:38 +1000310 * Interrupt entries are now very small (a push and a jump) but they are
311 * now slower (all registers pushed on stack which provides complete
312 * crash dumps in the low level handlers
Graeme Russ7228efa2010-10-07 20:03:23 +1100313 *
314 * Interrupt Entry Point:
315 * - Interrupt has caused eflags, CS and EIP to be pushed
316 * - Interrupt Vector Handler has pushed orig_eax
317 * - pt_regs.esp needs to be adjusted by 40 bytes:
318 * 12 bytes pushed by CPU (EFLAGSF, CS, EIP)
319 * 4 bytes pushed by vector handler (irq_id)
320 * 24 bytes pushed before SP (SS, GS, FS, ES, DS, EAX)
321 * NOTE: Only longs are pushed on/popped off the stack!
Graeme Russ564a9982009-11-24 20:04:18 +1100322 */
323asm(".globl irq_common_entry\n" \
Graeme Russ0fc1b492009-11-24 20:04:19 +1100324 ".hidden irq_common_entry\n" \
325 ".type irq_common_entry, @function\n" \
Graeme Russ564a9982009-11-24 20:04:18 +1100326 "irq_common_entry:\n" \
Graeme Russ433ff2b2010-04-24 00:05:38 +1000327 "cld\n" \
Graeme Russ7228efa2010-10-07 20:03:23 +1100328 "pushl %ss\n" \
Graeme Russ433ff2b2010-04-24 00:05:38 +1000329 "pushl %gs\n" \
330 "pushl %fs\n" \
331 "pushl %es\n" \
332 "pushl %ds\n" \
333 "pushl %eax\n" \
Graeme Russ7228efa2010-10-07 20:03:23 +1100334 "movl %esp, %eax\n" \
335 "addl $40, %eax\n" \
336 "pushl %eax\n" \
Graeme Russ433ff2b2010-04-24 00:05:38 +1000337 "pushl %ebp\n" \
338 "pushl %edi\n" \
339 "pushl %esi\n" \
340 "pushl %edx\n" \
341 "pushl %ecx\n" \
342 "pushl %ebx\n" \
343 "mov %esp, %eax\n" \
Graeme Russ564a9982009-11-24 20:04:18 +1100344 "call irq_llsr\n" \
Graeme Russ433ff2b2010-04-24 00:05:38 +1000345 "popl %ebx\n" \
346 "popl %ecx\n" \
347 "popl %edx\n" \
348 "popl %esi\n" \
349 "popl %edi\n" \
350 "popl %ebp\n" \
351 "popl %eax\n" \
Graeme Russ7228efa2010-10-07 20:03:23 +1100352 "popl %eax\n" \
Graeme Russ433ff2b2010-04-24 00:05:38 +1000353 "popl %ds\n" \
354 "popl %es\n" \
355 "popl %fs\n" \
356 "popl %gs\n" \
Graeme Russ7228efa2010-10-07 20:03:23 +1100357 "popl %ss\n" \
Graeme Russ433ff2b2010-04-24 00:05:38 +1000358 "add $4, %esp\n" \
Graeme Russ564a9982009-11-24 20:04:18 +1100359 "iret\n" \
360 DECLARE_INTERRUPT(0) \
361 DECLARE_INTERRUPT(1) \
362 DECLARE_INTERRUPT(2) \
363 DECLARE_INTERRUPT(3) \
364 DECLARE_INTERRUPT(4) \
365 DECLARE_INTERRUPT(5) \
366 DECLARE_INTERRUPT(6) \
367 DECLARE_INTERRUPT(7) \
368 DECLARE_INTERRUPT(8) \
369 DECLARE_INTERRUPT(9) \
370 DECLARE_INTERRUPT(10) \
371 DECLARE_INTERRUPT(11) \
372 DECLARE_INTERRUPT(12) \
373 DECLARE_INTERRUPT(13) \
374 DECLARE_INTERRUPT(14) \
375 DECLARE_INTERRUPT(15) \
376 DECLARE_INTERRUPT(16) \
377 DECLARE_INTERRUPT(17) \
378 DECLARE_INTERRUPT(18) \
379 DECLARE_INTERRUPT(19) \
380 DECLARE_INTERRUPT(20) \
381 DECLARE_INTERRUPT(21) \
382 DECLARE_INTERRUPT(22) \
383 DECLARE_INTERRUPT(23) \
384 DECLARE_INTERRUPT(24) \
385 DECLARE_INTERRUPT(25) \
386 DECLARE_INTERRUPT(26) \
387 DECLARE_INTERRUPT(27) \
388 DECLARE_INTERRUPT(28) \
389 DECLARE_INTERRUPT(29) \
390 DECLARE_INTERRUPT(30) \
391 DECLARE_INTERRUPT(31) \
392 DECLARE_INTERRUPT(32) \
393 DECLARE_INTERRUPT(33) \
394 DECLARE_INTERRUPT(34) \
395 DECLARE_INTERRUPT(35) \
396 DECLARE_INTERRUPT(36) \
397 DECLARE_INTERRUPT(37) \
398 DECLARE_INTERRUPT(38) \
399 DECLARE_INTERRUPT(39) \
400 DECLARE_INTERRUPT(40) \
401 DECLARE_INTERRUPT(41) \
402 DECLARE_INTERRUPT(42) \
403 DECLARE_INTERRUPT(43) \
404 DECLARE_INTERRUPT(44) \
405 DECLARE_INTERRUPT(45) \
406 DECLARE_INTERRUPT(46) \
407 DECLARE_INTERRUPT(47) \
408 DECLARE_INTERRUPT(48) \
409 DECLARE_INTERRUPT(49) \
410 DECLARE_INTERRUPT(50) \
411 DECLARE_INTERRUPT(51) \
412 DECLARE_INTERRUPT(52) \
413 DECLARE_INTERRUPT(53) \
414 DECLARE_INTERRUPT(54) \
415 DECLARE_INTERRUPT(55) \
416 DECLARE_INTERRUPT(56) \
417 DECLARE_INTERRUPT(57) \
418 DECLARE_INTERRUPT(58) \
419 DECLARE_INTERRUPT(59) \
420 DECLARE_INTERRUPT(60) \
421 DECLARE_INTERRUPT(61) \
422 DECLARE_INTERRUPT(62) \
423 DECLARE_INTERRUPT(63) \
424 DECLARE_INTERRUPT(64) \
425 DECLARE_INTERRUPT(65) \
426 DECLARE_INTERRUPT(66) \
427 DECLARE_INTERRUPT(67) \
428 DECLARE_INTERRUPT(68) \
429 DECLARE_INTERRUPT(69) \
430 DECLARE_INTERRUPT(70) \
431 DECLARE_INTERRUPT(71) \
432 DECLARE_INTERRUPT(72) \
433 DECLARE_INTERRUPT(73) \
434 DECLARE_INTERRUPT(74) \
435 DECLARE_INTERRUPT(75) \
436 DECLARE_INTERRUPT(76) \
437 DECLARE_INTERRUPT(77) \
438 DECLARE_INTERRUPT(78) \
439 DECLARE_INTERRUPT(79) \
440 DECLARE_INTERRUPT(80) \
441 DECLARE_INTERRUPT(81) \
442 DECLARE_INTERRUPT(82) \
443 DECLARE_INTERRUPT(83) \
444 DECLARE_INTERRUPT(84) \
445 DECLARE_INTERRUPT(85) \
446 DECLARE_INTERRUPT(86) \
447 DECLARE_INTERRUPT(87) \
448 DECLARE_INTERRUPT(88) \
449 DECLARE_INTERRUPT(89) \
450 DECLARE_INTERRUPT(90) \
451 DECLARE_INTERRUPT(91) \
452 DECLARE_INTERRUPT(92) \
453 DECLARE_INTERRUPT(93) \
454 DECLARE_INTERRUPT(94) \
455 DECLARE_INTERRUPT(95) \
456 DECLARE_INTERRUPT(97) \
457 DECLARE_INTERRUPT(96) \
458 DECLARE_INTERRUPT(98) \
459 DECLARE_INTERRUPT(99) \
460 DECLARE_INTERRUPT(100) \
461 DECLARE_INTERRUPT(101) \
462 DECLARE_INTERRUPT(102) \
463 DECLARE_INTERRUPT(103) \
464 DECLARE_INTERRUPT(104) \
465 DECLARE_INTERRUPT(105) \
466 DECLARE_INTERRUPT(106) \
467 DECLARE_INTERRUPT(107) \
468 DECLARE_INTERRUPT(108) \
469 DECLARE_INTERRUPT(109) \
470 DECLARE_INTERRUPT(110) \
471 DECLARE_INTERRUPT(111) \
472 DECLARE_INTERRUPT(112) \
473 DECLARE_INTERRUPT(113) \
474 DECLARE_INTERRUPT(114) \
475 DECLARE_INTERRUPT(115) \
476 DECLARE_INTERRUPT(116) \
477 DECLARE_INTERRUPT(117) \
478 DECLARE_INTERRUPT(118) \
479 DECLARE_INTERRUPT(119) \
480 DECLARE_INTERRUPT(120) \
481 DECLARE_INTERRUPT(121) \
482 DECLARE_INTERRUPT(122) \
483 DECLARE_INTERRUPT(123) \
484 DECLARE_INTERRUPT(124) \
485 DECLARE_INTERRUPT(125) \
486 DECLARE_INTERRUPT(126) \
487 DECLARE_INTERRUPT(127) \
488 DECLARE_INTERRUPT(128) \
489 DECLARE_INTERRUPT(129) \
490 DECLARE_INTERRUPT(130) \
491 DECLARE_INTERRUPT(131) \
492 DECLARE_INTERRUPT(132) \
493 DECLARE_INTERRUPT(133) \
494 DECLARE_INTERRUPT(134) \
495 DECLARE_INTERRUPT(135) \
496 DECLARE_INTERRUPT(136) \
497 DECLARE_INTERRUPT(137) \
498 DECLARE_INTERRUPT(138) \
499 DECLARE_INTERRUPT(139) \
500 DECLARE_INTERRUPT(140) \
501 DECLARE_INTERRUPT(141) \
502 DECLARE_INTERRUPT(142) \
503 DECLARE_INTERRUPT(143) \
504 DECLARE_INTERRUPT(144) \
505 DECLARE_INTERRUPT(145) \
506 DECLARE_INTERRUPT(146) \
507 DECLARE_INTERRUPT(147) \
508 DECLARE_INTERRUPT(148) \
509 DECLARE_INTERRUPT(149) \
510 DECLARE_INTERRUPT(150) \
511 DECLARE_INTERRUPT(151) \
512 DECLARE_INTERRUPT(152) \
513 DECLARE_INTERRUPT(153) \
514 DECLARE_INTERRUPT(154) \
515 DECLARE_INTERRUPT(155) \
516 DECLARE_INTERRUPT(156) \
517 DECLARE_INTERRUPT(157) \
518 DECLARE_INTERRUPT(158) \
519 DECLARE_INTERRUPT(159) \
520 DECLARE_INTERRUPT(160) \
521 DECLARE_INTERRUPT(161) \
522 DECLARE_INTERRUPT(162) \
523 DECLARE_INTERRUPT(163) \
524 DECLARE_INTERRUPT(164) \
525 DECLARE_INTERRUPT(165) \
526 DECLARE_INTERRUPT(166) \
527 DECLARE_INTERRUPT(167) \
528 DECLARE_INTERRUPT(168) \
529 DECLARE_INTERRUPT(169) \
530 DECLARE_INTERRUPT(170) \
531 DECLARE_INTERRUPT(171) \
532 DECLARE_INTERRUPT(172) \
533 DECLARE_INTERRUPT(173) \
534 DECLARE_INTERRUPT(174) \
535 DECLARE_INTERRUPT(175) \
536 DECLARE_INTERRUPT(176) \
537 DECLARE_INTERRUPT(177) \
538 DECLARE_INTERRUPT(178) \
539 DECLARE_INTERRUPT(179) \
540 DECLARE_INTERRUPT(180) \
541 DECLARE_INTERRUPT(181) \
542 DECLARE_INTERRUPT(182) \
543 DECLARE_INTERRUPT(183) \
544 DECLARE_INTERRUPT(184) \
545 DECLARE_INTERRUPT(185) \
546 DECLARE_INTERRUPT(186) \
547 DECLARE_INTERRUPT(187) \
548 DECLARE_INTERRUPT(188) \
549 DECLARE_INTERRUPT(189) \
550 DECLARE_INTERRUPT(190) \
551 DECLARE_INTERRUPT(191) \
552 DECLARE_INTERRUPT(192) \
553 DECLARE_INTERRUPT(193) \
554 DECLARE_INTERRUPT(194) \
555 DECLARE_INTERRUPT(195) \
556 DECLARE_INTERRUPT(196) \
557 DECLARE_INTERRUPT(197) \
558 DECLARE_INTERRUPT(198) \
559 DECLARE_INTERRUPT(199) \
560 DECLARE_INTERRUPT(200) \
561 DECLARE_INTERRUPT(201) \
562 DECLARE_INTERRUPT(202) \
563 DECLARE_INTERRUPT(203) \
564 DECLARE_INTERRUPT(204) \
565 DECLARE_INTERRUPT(205) \
566 DECLARE_INTERRUPT(206) \
567 DECLARE_INTERRUPT(207) \
568 DECLARE_INTERRUPT(208) \
569 DECLARE_INTERRUPT(209) \
570 DECLARE_INTERRUPT(210) \
571 DECLARE_INTERRUPT(211) \
572 DECLARE_INTERRUPT(212) \
573 DECLARE_INTERRUPT(213) \
574 DECLARE_INTERRUPT(214) \
575 DECLARE_INTERRUPT(215) \
576 DECLARE_INTERRUPT(216) \
577 DECLARE_INTERRUPT(217) \
578 DECLARE_INTERRUPT(218) \
579 DECLARE_INTERRUPT(219) \
580 DECLARE_INTERRUPT(220) \
581 DECLARE_INTERRUPT(221) \
582 DECLARE_INTERRUPT(222) \
583 DECLARE_INTERRUPT(223) \
584 DECLARE_INTERRUPT(224) \
585 DECLARE_INTERRUPT(225) \
586 DECLARE_INTERRUPT(226) \
587 DECLARE_INTERRUPT(227) \
588 DECLARE_INTERRUPT(228) \
589 DECLARE_INTERRUPT(229) \
590 DECLARE_INTERRUPT(230) \
591 DECLARE_INTERRUPT(231) \
592 DECLARE_INTERRUPT(232) \
593 DECLARE_INTERRUPT(233) \
594 DECLARE_INTERRUPT(234) \
595 DECLARE_INTERRUPT(235) \
596 DECLARE_INTERRUPT(236) \
597 DECLARE_INTERRUPT(237) \
598 DECLARE_INTERRUPT(238) \
599 DECLARE_INTERRUPT(239) \
600 DECLARE_INTERRUPT(240) \
601 DECLARE_INTERRUPT(241) \
602 DECLARE_INTERRUPT(242) \
603 DECLARE_INTERRUPT(243) \
604 DECLARE_INTERRUPT(244) \
605 DECLARE_INTERRUPT(245) \
606 DECLARE_INTERRUPT(246) \
607 DECLARE_INTERRUPT(247) \
608 DECLARE_INTERRUPT(248) \
609 DECLARE_INTERRUPT(249) \
610 DECLARE_INTERRUPT(250) \
611 DECLARE_INTERRUPT(251) \
612 DECLARE_INTERRUPT(252) \
613 DECLARE_INTERRUPT(253) \
614 DECLARE_INTERRUPT(254) \
615 DECLARE_INTERRUPT(255));