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