2 * arch/v850/kernel/intv.S -- Interrupt vectors
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
11 * Written by Miles Bader <miles@gnu.org>
14 #include <asm/clinkage.h>
16 #include <asm/machdep.h>
17 #include <asm/entry.h>
19 #ifdef CONFIG_V850E_HIGHRES_TIMER
20 #include <asm/highres_timer.h>
23 /* Jump to an interrupt/trap handler. These handlers (defined in entry.S)
24 expect the stack-pointer to be saved in ENTRY_SP, so we use sp to do an
25 indirect jump (which avoids problems when the handler is more than a signed
26 22-bit offset away). */
27 #define JUMP_TO_HANDLER(name, sp_save_loc) \
28 st.w sp, sp_save_loc; \
34 .section .intv.reset, "ax"
36 mov hilo(C_SYMBOL_NAME(start)), r1;
40 /* Generic interrupt vectors. */
41 .section .intv.common, "ax"
43 JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x10 - NMI0
45 JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x20 - NMI1
47 JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x30 - NMI2
50 JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x40 - TRAP0n
52 JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x50 - TRAP1n
55 JUMP_TO_HANDLER (dbtrap, ENTRY_SP) // 0x60 - Illegal op / DBTRAP insn
58 /* Hardware interrupt vectors. */
59 .section .intv.mach, "ax"
62 #if defined (CONFIG_V850E_HIGHRES_TIMER) && defined (IRQ_INTCMD)
64 /* Interrupts before the highres timer interrupt. */
65 .rept IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT)
67 JUMP_TO_HANDLER (irq, ENTRY_SP)
70 /* The highres timer interrupt. */
72 JUMP_TO_HANDLER (C_SYMBOL_NAME (highres_timer_slow_tick_irq), ENTRY_SP)
74 /* Interrupts after the highres timer interrupt. */
75 .rept NUM_CPU_IRQS - IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT) - 1
77 JUMP_TO_HANDLER (irq, ENTRY_SP)
80 #else /* No highres timer */
84 JUMP_TO_HANDLER (irq, ENTRY_SP)
87 #endif /* Highres timer */