Index: arch/mips32/include/interrupt.h
===================================================================
--- arch/mips32/include/interrupt.h	(revision 6095342f82cb691572e06dbe4aef66ee04a8d94a)
+++ arch/mips32/include/interrupt.h	(revision aace66246817c8294c86afeed5614d6d999892dd)
@@ -32,5 +32,5 @@
 #include <arch/exception.h>
 
-#define IVT_ITEMS   32
+#define IVT_ITEMS   8
 
 #define IRQ2	2
Index: generic/include/interrupt.h
===================================================================
--- generic/include/interrupt.h	(revision 6095342f82cb691572e06dbe4aef66ee04a8d94a)
+++ generic/include/interrupt.h	(revision aace66246817c8294c86afeed5614d6d999892dd)
@@ -38,6 +38,7 @@
 typedef void (* iroutine)(int n, void *stack);
 
-extern iroutine exc_register(int n, char *name, iroutine f);
+extern iroutine exc_register(int n, const char *name, iroutine f);
 extern void exc_dispatch(int n, void *stack);
+void exc_init(void);
 
 #endif
Index: generic/src/interrupt/interrupt.c
===================================================================
--- generic/src/interrupt/interrupt.c	(revision 6095342f82cb691572e06dbe4aef66ee04a8d94a)
+++ generic/src/interrupt/interrupt.c	(revision aace66246817c8294c86afeed5614d6d999892dd)
@@ -29,11 +29,25 @@
 #include <interrupt.h>
 #include <debug.h>
+#include <console/kconsole.h>
+#include <console/console.h>
+#include <console/chardev.h>
+#include <panic.h>
+#include <print.h>
+#include <symtab.h>
 
 static struct {
-	char *name;
+	const char *name;
 	iroutine f;
-} ivt[IVT_ITEMS];
+} exc_table[IVT_ITEMS];
 
-iroutine exc_register(int n, char *name, iroutine f)
+static spinlock_t exctbl_lock;
+
+/** Register exception handler
+ * 
+ * @param n Exception number
+ * @param name Description 
+ * @param f Exception handler
+ */
+iroutine exc_register(int n, const char *name, iroutine f)
 {
 	ASSERT(n < IVT_ITEMS);
@@ -41,12 +55,17 @@
 	iroutine old;
 	
-	old = ivt[n].f;
-	ivt[n].f = f;
-	ivt[n].name = name;
-	
+	spinlock_lock(&exctbl_lock);
+
+	old = exc_table[n].f;
+	exc_table[n].f = f;
+	exc_table[n].name = name;
+
+	spinlock_unlock(&exctbl_lock);	
+
 	return old;
 }
 
-/*
+/** Dispatch exception according to exception table
+ *
  * Called directly from the assembler code.
  * CPU is interrupts_disable()'d.
@@ -56,4 +75,61 @@
 	ASSERT(n < IVT_ITEMS);
 	
-	ivt[n].f(n, stack);
+	exc_table[n].f(n, stack);
 }
+
+/** Default 'null' exception handler */
+static void exc_undef(int n, void *stack)
+{
+	panic("Unhandled exception %d.", n);
+}
+
+/** KConsole cmd - print all exceptions */
+static int exc_print_cmd(cmd_arg_t *argv)
+{
+	int i;
+	char *symbol;
+
+	spinlock_lock(&exctbl_lock);
+	printf("Exc Handler    Description\n");
+	for (i=0; i < IVT_ITEMS; i++) {
+		symbol = get_symtab_entry((__native)exc_table[i].f);
+		if (!symbol)
+			symbol = "not found";
+		printf("%d %s 0x%p(%s)\n",i,exc_table[i].name,
+		       exc_table[i].f,symbol);		
+		if (!((i+1) % 20)) {
+			printf("Press any key to continue.");
+			getc(stdin);
+			printf("\n");
+		}
+	}
+	spinlock_unlock(&exctbl_lock);
+	
+	return 1;
+}
+
+static cmd_info_t exc_info = {
+	.name = "exc_print",
+	.description = "Print exception table",
+	.func = exc_print_cmd,
+	.help = NULL,
+	.argc = 0,
+	.argv = NULL
+};
+
+/** Initialize generic exception handling support */
+void exc_init(void)
+{
+	int i;
+
+	spinlock_initialize(&exctbl_lock, "exctbl_lock");
+
+	for (i=0;i < IVT_ITEMS; i++)
+		exc_register(i, "undef", exc_undef);
+
+	spinlock_initialize(&exc_info.lock, "kconsole_excinfo");
+	link_initialize(&exc_info.link);
+	if (!cmd_register(&exc_info))
+		panic("could not register command %s\n", exc_info.name);
+}
+
Index: generic/src/main/kinit.c
===================================================================
--- generic/src/main/kinit.c	(revision 6095342f82cb691572e06dbe4aef66ee04a8d94a)
+++ generic/src/main/kinit.c	(revision aace66246817c8294c86afeed5614d6d999892dd)
@@ -45,4 +45,5 @@
 #include <memstr.h>
 #include <console/console.h>
+#include <interrupt.h>
 #include <console/kconsole.h>
 
Index: generic/src/main/main.c
===================================================================
--- generic/src/main/main.c	(revision 6095342f82cb691572e06dbe4aef66ee04a8d94a)
+++ generic/src/main/main.c	(revision aace66246817c8294c86afeed5614d6d999892dd)
@@ -41,4 +41,5 @@
 #include <cpu.h>
 #include <align.h>
+#include <interrupt.h>
 
 #ifdef CONFIG_SMP
@@ -174,4 +175,8 @@
 	 */
 	kconsole_init();
+	/* Exception handler initialization, before architecture
+	 * starts adding it's own handlers
+	 */
+	exc_init();
 	
 	arch_pre_mm_init();
