Index: arch/sparc64/Makefile.inc
===================================================================
--- arch/sparc64/Makefile.inc	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/Makefile.inc	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -61,3 +61,4 @@
 	arch/$(ARCH)/src/trap/trap_table.S \
 	arch/$(ARCH)/src/trap/trap.c \
-	arch/$(ARCH)/src/trap/interrupt.c
+	arch/$(ARCH)/src/trap/interrupt.c \
+	arch/$(ARCH)/src/drivers/tick.c
Index: arch/sparc64/include/asm.h
===================================================================
--- arch/sparc64/include/asm.h	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/include/asm.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -101,4 +101,25 @@
 }
 
+/** Read SOFTINT Register.
+ *
+ * @return Value of SOFTINT register.
+ */
+static inline __u64 softint_read(void)
+{
+	__u64 v;
+
+	__asm__ volatile ("rd %%softint, %0\n" : "=r" (v));
+
+	return v;
+}
+
+/** Write SOFTINT Register.
+ *
+ * @param New value of SOFTINT register.
+ */
+static inline void softint_write(__u64 v)
+{
+	__asm__ volatile ("wr %0, %1, %%softint\n" : : "r" (v), "i" (0));
+}
 
 /** Enable interrupts.
Index: arch/sparc64/include/drivers/tick.h
===================================================================
--- arch/sparc64/include/drivers/tick.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
+++ arch/sparc64/include/drivers/tick.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __sparc64_TICK_H__
+#define __sparc64_TICK_H__
+
+#define TICK_DELTA        100000
+
+extern void tick_init(void);
+extern void tick_interrupt(int n, void *stack);
+
+#endif
Index: arch/sparc64/include/interrupt.h
===================================================================
--- arch/sparc64/include/interrupt.h	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/include/interrupt.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -30,3 +30,10 @@
 #define __sparc64_INTERRUPT_H__
 
+#include <typedefs.h>
+
+#define IVT_ITEMS 	15
+#define IVT_FIRST	1
+
+extern void interrupt_register(int n, const char *name, iroutine f);
+
 #endif
Index: arch/sparc64/include/register.h
===================================================================
--- arch/sparc64/include/register.h	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/include/register.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -81,5 +81,5 @@
 	__u64 value;
 	struct {
-		unsigned int_dis : 1;	/**< TICK_INT interrupt enable. */
+		unsigned int_dis : 1;	/**< TICK_INT interrupt disabled flag. */
 		__u64 tick_cmpr : 63;	/**< Compare value for TICK interrupts. */
 	} __attribute__ ((packed));
@@ -87,3 +87,15 @@
 typedef union tick_compare_reg tick_compare_reg_t;
 
+/** SOFTINT Register. */
+union softint_reg {
+	__u64 value;
+	struct {
+		__u64 : 47; 
+		unsigned stick_int : 1;
+		unsigned int_level : 15;
+		unsigned tick_int : 1;
+	} __attribute__ ((packed));
+};
+typedef union softint_reg softint_reg_t;
+
 #endif
Index: arch/sparc64/include/trap/interrupt.h
===================================================================
--- arch/sparc64/include/trap/interrupt.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
+++ arch/sparc64/include/trap/interrupt.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * This file contains interrupt vector trap handler.
+ */
+
+#ifndef __sparc64_INTERRUPT_H__
+#define __sparc64_INTERRUPT_H__
+
+#include <arch/trap/trap_table.h>
+
+#define TT_INTERRUPT_LEVEL_1			0x41
+#define TT_INTERRUPT_LEVEL_2			0x42
+#define TT_INTERRUPT_LEVEL_3			0x43
+#define TT_INTERRUPT_LEVEL_4			0x44
+#define TT_INTERRUPT_LEVEL_5			0x45
+#define TT_INTERRUPT_LEVEL_6			0x46
+#define TT_INTERRUPT_LEVEL_7			0x47
+#define TT_INTERRUPT_LEVEL_8			0x48
+#define TT_INTERRUPT_LEVEL_9			0x49
+#define TT_INTERRUPT_LEVEL_10			0x4a
+#define TT_INTERRUPT_LEVEL_11			0x4b
+#define TT_INTERRUPT_LEVEL_12			0x4c
+#define TT_INTERRUPT_LEVEL_13			0x4d
+#define TT_INTERRUPT_LEVEL_14			0x4e
+#define TT_INTERRUPT_LEVEL_15			0x4f
+
+#define TT_INTERRUPT_VECTOR_TRAP		0x60
+
+#define INTERRUPT_LEVEL_N_HANDLER_SIZE		TRAP_TABLE_ENTRY_SIZE
+#define INTERRUPT_VECTOR_TRAP_HANDLER_SIZE	TRAP_TABLE_ENTRY_SIZE
+
+#ifdef __ASM__
+.macro INTERRUPT_LEVEL_N_HANDLER n
+	save %sp, -128, %sp
+	mov \n - 1, %o0
+	call exc_dispatch
+	mov %fp, %o1
+	restore
+	retry
+.endm
+
+.macro INTERRUPT_VECTOR_TRAP_HANDLER
+	retry
+.endm
+#endif /* __ASM__ */
+
+#endif
Index: arch/sparc64/src/console.c
===================================================================
--- arch/sparc64/src/console.c	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/src/console.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -31,4 +31,6 @@
 #include <console/chardev.h>
 #include <console/console.h>
+#include <arch/asm.h>
+#include <arch/register.h>
 
 static void ofw_sparc64_putchar(chardev_t *d, const char ch);
@@ -51,6 +53,18 @@
 void ofw_sparc64_putchar(chardev_t *d, const char ch)
 {
+	pstate_reg_t pstate;
+
+	/*
+	 * 32-bit OpenFirmware depends on PSTATE.AM bit set.
+	 */	
+	pstate.value = pstate_read();
+	pstate.am = true;
+	pstate_write(pstate.value);
+
 	if (ch == '\n')
 		ofw_putchar('\r');
 	ofw_putchar(ch);
+	
+	pstate.am = false;
+	pstate_write(pstate.value);
 }
Index: arch/sparc64/src/drivers/tick.c
===================================================================
--- arch/sparc64/src/drivers/tick.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
+++ arch/sparc64/src/drivers/tick.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <arch/drivers/tick.h>
+#include <arch/interrupt.h>
+#include <arch/asm.h>
+#include <arch/register.h>
+#include <debug.h>
+#include <print.h>
+
+void tick_init(void)
+{
+	tick_compare_reg_t compare;
+	
+	interrupt_register(14, "tick_int", tick_interrupt);
+	compare.int_dis = false;
+	compare.tick_cmpr = TICK_DELTA;
+	tick_compare_write(compare.value);
+	tick_write(0);
+}
+
+void tick_interrupt(int n, void *stack)
+{
+	panic("Unserviced %s.\n", __FUNCTION__);
+}
Index: arch/sparc64/src/sparc64.c
===================================================================
--- arch/sparc64/src/sparc64.c	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/src/sparc64.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -31,4 +31,5 @@
 #include <arch/trap/trap.h>
 #include <arch/console.h>
+#include <arch/drivers/tick.h>
 
 void arch_pre_mm_init(void)
@@ -37,4 +38,5 @@
 	ofw_sparc64_console_init();
 	trap_init();
+	tick_init();
 }
 
Index: arch/sparc64/src/trap/interrupt.c
===================================================================
--- arch/sparc64/src/trap/interrupt.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
+++ arch/sparc64/src/trap/interrupt.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <arch/interrupt.h>
+#include <interrupt.h>
+#include <debug.h>
+
+/** Register Interrupt Level Handler.
+ *
+ * @param n Interrupt Level (1 - 15).
+ * @param name Short descriptive string.
+ * @param f Handler.
+ */
+void interrupt_register(int n, const char *name, iroutine f)
+{
+	ASSERT(n >= IVT_FIRST && n <= IVT_ITEMS);
+	
+	exc_register(n - 1, name, f);
+}
Index: arch/sparc64/src/trap/trap.c
===================================================================
--- arch/sparc64/src/trap/trap.c	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/src/trap/trap.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -36,4 +36,5 @@
 #include <arch/types.h>
 #include <typedefs.h>
+#include <arch/drivers/tick.h>
 
 /** Initialize trap table. */
@@ -59,5 +60,19 @@
 	trap_install_handler(TT_SPILL_0_NORMAL, SPILL_HANDLER_SIZE, true);
 	trap_install_handler(TT_FILL_0_NORMAL, FILL_HANDLER_SIZE, true);
-	
+	trap_install_handler(TT_INTERRUPT_LEVEL_1, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_2, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_3, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_4, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_5, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_6, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_7, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_8, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_9, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_10, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_11, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_12, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_13, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_14, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
+	trap_install_handler(TT_INTERRUPT_LEVEL_15, INTERRUPT_LEVEL_N_HANDLER_SIZE, false);
 	trap_install_handler(TT_INTERRUPT_VECTOR_TRAP, INTERRUPT_VECTOR_TRAP_HANDLER_SIZE, false);
 }
Index: arch/sparc64/src/trap/trap_table.S
===================================================================
--- arch/sparc64/src/trap/trap_table.S	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ arch/sparc64/src/trap/trap_table.S	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -61,4 +61,94 @@
 	CLEAN_WINDOW_HANDLER
 
+/* TT = 0x41, TL = 0, interrupt_level_1 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_1*ENTRY_SIZE
+.global interrupt_level_1_handler
+interrupt_level_1_handler:
+	INTERRUPT_LEVEL_N_HANDLER 1
+
+/* TT = 0x42, TL = 0, interrupt_level_2 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_2*ENTRY_SIZE
+.global interrupt_level_2_handler
+interrupt_level_2_handler:
+	INTERRUPT_LEVEL_N_HANDLER 2
+
+/* TT = 0x43, TL = 0, interrupt_level_3 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_3*ENTRY_SIZE
+.global interrupt_level_3_handler
+interrupt_level_3_handler:
+	INTERRUPT_LEVEL_N_HANDLER 3
+
+/* TT = 0x44, TL = 0, interrupt_level_4 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_4*ENTRY_SIZE
+.global interrupt_level_4_handler
+interrupt_level_4_handler:
+	INTERRUPT_LEVEL_N_HANDLER 4
+
+/* TT = 0x45, TL = 0, interrupt_level_5 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_5*ENTRY_SIZE
+.global interrupt_level_5_handler
+interrupt_level_5_handler:
+	INTERRUPT_LEVEL_N_HANDLER 5
+
+/* TT = 0x46, TL = 0, interrupt_level_6 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_6*ENTRY_SIZE
+.global interrupt_level_6_handler
+interrupt_level_6_handler:
+	INTERRUPT_LEVEL_N_HANDLER 6
+
+/* TT = 0x47, TL = 0, interrupt_level_7 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_7*ENTRY_SIZE
+.global interrupt_level_7_handler
+interrupt_level_7_handler:
+	INTERRUPT_LEVEL_N_HANDLER 7
+
+/* TT = 0x48, TL = 0, interrupt_level_8 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_8*ENTRY_SIZE
+.global interrupt_level_8_handler
+interrupt_level_8_handler:
+	INTERRUPT_LEVEL_N_HANDLER 8
+
+/* TT = 0x49, TL = 0, interrupt_level_9 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_9*ENTRY_SIZE
+.global interrupt_level_9_handler
+interrupt_level_9_handler:
+	INTERRUPT_LEVEL_N_HANDLER 9
+
+/* TT = 0x4a, TL = 0, interrupt_level_10 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_10*ENTRY_SIZE
+.global interrupt_level_10_handler
+interrupt_level_10_handler:
+	INTERRUPT_LEVEL_N_HANDLER 10
+
+/* TT = 0x4b, TL = 0, interrupt_level_11 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_11*ENTRY_SIZE
+.global interrupt_level_11_handler
+interrupt_level_11_handler:
+	INTERRUPT_LEVEL_N_HANDLER 11
+
+/* TT = 0x4c, TL = 0, interrupt_level_12 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_12*ENTRY_SIZE
+.global interrupt_level_12_handler
+interrupt_level_12_handler:
+	INTERRUPT_LEVEL_N_HANDLER 12
+
+/* TT = 0x4d, TL = 0, interrupt_level_13 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_13*ENTRY_SIZE
+.global interrupt_level_13_handler
+interrupt_level_13_handler:
+	INTERRUPT_LEVEL_N_HANDLER 13
+
+/* TT = 0x4e, TL = 0, interrupt_level_14 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_14*ENTRY_SIZE
+.global interrupt_level_14_handler
+interrupt_level_14_handler:
+	INTERRUPT_LEVEL_N_HANDLER 14
+
+/* TT = 0x4f, TL = 0, interrupt_level_15 handler */
+.org trap_table + TT_INTERRUPT_LEVEL_15*ENTRY_SIZE
+.global interrupt_level_15_handler
+interrupt_level_15_handler:
+	INTERRUPT_LEVEL_N_HANDLER 15
+
 /* TT = 0x60, TL = 0, interrupt_vector_trap handler */
 .org trap_table + TT_INTERRUPT_VECTOR_TRAP*ENTRY_SIZE
Index: generic/include/interrupt.h
===================================================================
--- generic/include/interrupt.h	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ generic/include/interrupt.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -31,10 +31,13 @@
 
 #include <arch/interrupt.h>
+#include <typedefs.h>
 
 #ifndef IVT_ITEMS
-#  define IVT_ITEMS 0
+#	define IVT_ITEMS 0
 #endif
 
-typedef void (* iroutine)(int n, void *stack);
+#ifndef IVT_FIRST
+#	define IVT_FIRST 0
+#endif
 
 extern iroutine exc_register(int n, const char *name, iroutine f);
Index: generic/include/typedefs.h
===================================================================
--- generic/include/typedefs.h	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ generic/include/typedefs.h	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -87,3 +87,5 @@
 typedef struct cmd_info cmd_info_t;
 
+typedef void (* iroutine)(int n, void *stack);
+
 #endif
Index: generic/src/interrupt/interrupt.c
===================================================================
--- generic/src/interrupt/interrupt.c	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
+++ generic/src/interrupt/interrupt.c	(revision 39494010cd29538c76268953cc313e6c622f06d5)
@@ -75,5 +75,5 @@
 	ASSERT(n < IVT_ITEMS);
 	
-	exc_table[n].f(n, stack);
+	exc_table[n].f(n + IVT_FIRST, stack);
 }
 
@@ -84,5 +84,5 @@
 }
 
-/** KConsole cmd - print all exceptions */
+/** kconsole cmd - print all exceptions */
 static int exc_print_cmd(cmd_arg_t *argv)
 {
@@ -96,5 +96,5 @@
 		if (!symbol)
 			symbol = "not found";
-		printf("%d %s 0x%p(%s)\n",i,exc_table[i].name,
+		printf("%d %s 0x%p(%s)\n", i + IVT_FIRST, exc_table[i].name,
 		       exc_table[i].f,symbol);		
 		if (!((i+1) % 20)) {
