summaryrefslogtreecommitdiffstats
path: root/arch/v850/kernel/intv.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/v850/kernel/intv.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/v850/kernel/intv.S')
-rw-r--r--arch/v850/kernel/intv.S87
1 files changed, 87 insertions, 0 deletions
diff --git a/arch/v850/kernel/intv.S b/arch/v850/kernel/intv.S
new file mode 100644
index 00000000000..671e4c6150d
--- /dev/null
+++ b/arch/v850/kernel/intv.S
@@ -0,0 +1,87 @@
+/*
+ * arch/v850/kernel/intv.S -- Interrupt vectors
+ *
+ * Copyright (C) 2001,02,03 NEC Electronics Corporation
+ * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file COPYING in the main directory of this
+ * archive for more details.
+ *
+ * Written by Miles Bader <miles@gnu.org>
+ */
+
+#include <asm/clinkage.h>
+#include <asm/irq.h>
+#include <asm/machdep.h>
+#include <asm/entry.h>
+
+#ifdef CONFIG_V850E_HIGHRES_TIMER
+#include <asm/highres_timer.h>
+#endif
+
+/* Jump to an interrupt/trap handler. These handlers (defined in entry.S)
+ expect the stack-pointer to be saved in ENTRY_SP, so we use sp to do an
+ indirect jump (which avoids problems when the handler is more than a signed
+ 22-bit offset away). */
+#define JUMP_TO_HANDLER(name, sp_save_loc) \
+ st.w sp, sp_save_loc; \
+ mov hilo(name), sp; \
+ jmp [sp]
+
+
+ /* Reset vector. */
+ .section .intv.reset, "ax"
+ .org 0x0
+ mov hilo(C_SYMBOL_NAME(start)), r1;
+ jmp [r1]
+
+
+ /* Generic interrupt vectors. */
+ .section .intv.common, "ax"
+ .balign 0x10
+ JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x10 - NMI0
+ .balign 0x10
+ JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x20 - NMI1
+ .balign 0x10
+ JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x30 - NMI2
+
+ .balign 0x10
+ JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x40 - TRAP0n
+ .balign 0x10
+ JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x50 - TRAP1n
+
+ .balign 0x10
+ JUMP_TO_HANDLER (dbtrap, ENTRY_SP) // 0x60 - Illegal op / DBTRAP insn
+
+
+ /* Hardware interrupt vectors. */
+ .section .intv.mach, "ax"
+ .org 0x0
+
+#if defined (CONFIG_V850E_HIGHRES_TIMER) && defined (IRQ_INTCMD)
+
+ /* Interrupts before the highres timer interrupt. */
+ .rept IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT)
+ .balign 0x10
+ JUMP_TO_HANDLER (irq, ENTRY_SP)
+ .endr
+
+ /* The highres timer interrupt. */
+ .balign 0x10
+ JUMP_TO_HANDLER (C_SYMBOL_NAME (highres_timer_slow_tick_irq), ENTRY_SP)
+
+ /* Interrupts after the highres timer interrupt. */
+ .rept NUM_CPU_IRQS - IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT) - 1
+ .balign 0x10
+ JUMP_TO_HANDLER (irq, ENTRY_SP)
+ .endr
+
+#else /* No highres timer */
+
+ .rept NUM_CPU_IRQS
+ .balign 0x10
+ JUMP_TO_HANDLER (irq, ENTRY_SP)
+ .endr
+
+#endif /* Highres timer */