5 Copyright © 2000, The AROS Development Team. All rights reserved.
8 Desc: Interrupt core, part of kernel.resource
12 #include <exec/types.h>
13 #include <exec/execbase.h>
15 #include <asm/linkage.h>
17 /* Here are some macros used to build interrupt table in core file. */
19 #define IRQ_NAME2(nr) nr##_interrupt(void)
20 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
22 #define BUILD_IRQ(nr) \
23 /*asmlinkage*/ void IRQ_NAME(nr); \
26 ".globl "SYMBOL_NAME_STR(IRQ) #nr "_interrupt\n\t" \
27 ".type "SYMBOL_NAME_STR(IRQ) #nr "_interrupt, function\n\t" \
28 "\n\t"__ALIGN_STR"\n" \
29 SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
30 "sub sp, sp, #(17*4)\n\t" \
31 "stmia sp, {r0-r12}\n\t" \
32 "add r8, sp, #(13*4)\n\t" \
33 "stmia r8, {sp,lr}^\n\t" \
35 "str lr, [sp, #(15*4)]\n\t" \
37 "str r8, [sp, #(16*4)]\n\t" \
40 "bl "SYMBOL_NAME_STR(do_IRQ)"\n\t"\
42 "ldr r0, [sp, #(16*4)]\n\t" \
44 "ldr lr, [sp, #(15*4)]\n\t" \
45 "ldmia sp, {r0-lr}^\n\t" \
47 "add sp, sp, #(17*4)\n\t" \
48 "subs pc, lr, #4\n\t");
52 struct irqDescriptor irq_desc
[NR_IRQS
];
55 #define PLATFORMDATA(x) ((struct PlatformData *)(x)->PlatformData)
57 BOOL
init_core(struct ExecBase
*);
58 BOOL
irqSet(int, struct irqServer
*, void *, struct ExecBase
*);
60 void disable_irq(unsigned int virq
);
61 void enable_irq(unsigned int virq
);