Index: arch/sparc64/Makefile.inc
===================================================================
--- arch/sparc64/Makefile.inc	(revision 7ae44435719a45d52472fa45638d0a67fd5cf700)
+++ arch/sparc64/Makefile.inc	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
@@ -60,3 +60,4 @@
 	arch/$(ARCH)/src/start.S \
 	arch/$(ARCH)/src/trap/trap_table.S \
-	arch/$(ARCH)/src/trap/trap.c
+	arch/$(ARCH)/src/trap/trap.c \
+	arch/$(ARCH)/src/trap/interrupt.c
Index: arch/sparc64/src/dummy.s
===================================================================
--- arch/sparc64/src/dummy.s	(revision 7ae44435719a45d52472fa45638d0a67fd5cf700)
+++ arch/sparc64/src/dummy.s	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
@@ -30,5 +30,4 @@
 
 .global asm_delay_loop
-.global cpu_halt
 .global cpu_sleep
 .global fmath_dpow
@@ -46,5 +45,4 @@
 
 asm_delay_loop:
-cpu_halt:
 cpu_sleep:
 fmath_dpow:
@@ -62,2 +60,7 @@
 	retl
 	nop
+
+.global cpu_halt
+cpu_halt:
+	b cpu_halt
+	nop
Index: arch/sparc64/src/panic.S
===================================================================
--- arch/sparc64/src/panic.S	(revision 7ae44435719a45d52472fa45638d0a67fd5cf700)
+++ arch/sparc64/src/panic.S	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
@@ -35,2 +35,3 @@
 	call halt
 	nop
+	/* Not reached. */
Index: arch/sparc64/src/sparc64.c
===================================================================
--- arch/sparc64/src/sparc64.c	(revision 7ae44435719a45d52472fa45638d0a67fd5cf700)
+++ arch/sparc64/src/sparc64.c	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
@@ -34,4 +34,5 @@
 void arch_pre_mm_init(void)
 {
+	interrupts_disable();
 	ofw_sparc64_console_init();
 	trap_init();
Index: arch/sparc64/src/trap/trap.c
===================================================================
--- arch/sparc64/src/trap/trap.c	(revision 7ae44435719a45d52472fa45638d0a67fd5cf700)
+++ arch/sparc64/src/trap/trap.c	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
@@ -30,4 +30,5 @@
 #include <arch/trap/trap_table.h>
 #include <arch/trap/regwin.h>
+#include <arch/trap/interrupt.h>
 #include <arch/asm.h>
 #include <memstr.h>
@@ -55,4 +56,9 @@
 	trap_install_handler(TT_SPILL_0_NORMAL, SPILL_HANDLER_SIZE, false);
 	trap_install_handler(TT_FILL_0_NORMAL, FILL_HANDLER_SIZE, false);
+	trap_install_handler(TT_CLEAN_WINDOW, CLEAN_WINDOW_HANDLER_SIZE, true);
+	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_VECTOR_TRAP, INTERRUPT_VECTOR_TRAP_HANDLER_SIZE, false);
 }
 
Index: arch/sparc64/src/trap/trap_table.S
===================================================================
--- arch/sparc64/src/trap/trap_table.S	(revision 7ae44435719a45d52472fa45638d0a67fd5cf700)
+++ arch/sparc64/src/trap/trap_table.S	(revision 5b1ced06235ec690c681e232875d536e8c46842b)
@@ -43,4 +43,5 @@
 #include <arch/trap/trap_table.h>
 #include <arch/trap/regwin.h>
+#include <arch/trap/interrupt.h>
 
 #define TABLE_SIZE	TRAP_TABLE_SIZE
@@ -54,5 +55,5 @@
 trap_table:
 
-/* TT = 0x24, TL = 0 *, clean_window handler */
+/* TT = 0x24, TL = 0, clean_window handler */
 .org trap_table + TT_CLEAN_WINDOW*ENTRY_SIZE
 .global clean_window_handler
@@ -60,5 +61,11 @@
 	CLEAN_WINDOW_HANDLER
 
-/* TT = 0x80, TL = 0 *, spill_0_normal handler */
+/* TT = 0x60, TL = 0, interrupt_vector_trap handler */
+.org trap_table + TT_INTERRUPT_VECTOR_TRAP*ENTRY_SIZE
+.global interrupt_vector_trap_handler
+interrupt_vector_trap_handler:
+	INTERRUPT_VECTOR_TRAP_HANDLER
+
+/* TT = 0x80, TL = 0, spill_0_normal handler */
 .org trap_table + TT_SPILL_0_NORMAL*ENTRY_SIZE
 .global spill_0_normal
@@ -66,40 +73,35 @@
 	SPILL_NORMAL_HANDLER
 
-/* TT = 0xc0, TL = 0 *, fill_0_normal handler */
+/* TT = 0xc0, TL = 0, fill_0_normal handler */
 .org trap_table + TT_FILL_0_NORMAL*ENTRY_SIZE
+.global fill_0_normal
 fill_0_normal:
 	FILL_NORMAL_HANDLER
 
 /*
- * Software traps for TL=0.
+ * Handlers for TL>0.
  */
-.org trap_table + 256*ENTRY_SIZE
-tl_0_software_traps:
 
-/* Reserved area. */
-.org trap_table + 384*ENTRY_SIZE
-.space 128*ENTRY_SIZE, 0
+/* TT = 0x24, TL > 0, clean_window handler */
+.org trap_table + (TT_CLEAN_WINDOW+512)*ENTRY_SIZE
+.global clean_window_handler_high
+clean_window_handler_high:
+	CLEAN_WINDOW_HANDLER
 
-/*
- * Hardware interrupts for TL>0.
- */
-.org trap_table + 512*ENTRY_SIZE
-tl_non_0_hardware_traps:
 
-/*
- * Register window spill/fill traps for TL>0.
- */
-.org trap_table + 640*ENTRY_SIZE
-tl_non_0_regwin_traps:
+/* TT = 0x80, TL > 0, spill_0_normal handler */
 
-/*
- * Software traps for TL>0.
- */
-.org trap_table + 768*ENTRY_SIZE
-tl_non_0_software_traps:
+.org trap_table + (TT_SPILL_0_NORMAL+512)*ENTRY_SIZE
+.global spill_0_normal_high
+spill_0_normal_high:
+	SPILL_NORMAL_HANDLER
 
-/* Reserved area. */
-.org trap_table + 896*ENTRY_SIZE
-.space 128*ENTRY_SIZE, 0
+
+/* TT = 0xc0, TL > 0, fill_0_normal handler */
+.org trap_table + (TT_FILL_0_NORMAL+512)*ENTRY_SIZE
+.global fill_0_normal_high
+fill_0_normal_high:
+	FILL_NORMAL_HANDLER
+
 
 
@@ -107,4 +109,5 @@
  * Save trap table.
  */
+.align TABLE_SIZE
 .global trap_table_save
 trap_table_save:
