Index: kernel/arch/ia64/src/ivt.S
===================================================================
--- kernel/arch/ia64/src/ivt.S	(revision 293703eac83c474ec39de43bd1ee4aa8557d6286)
+++ kernel/arch/ia64/src/ivt.S	(revision 58775d300aa95ded242da9557f2f452dc913e8f5)
@@ -31,4 +31,5 @@
 #include <arch/register.h>
 #include <arch/mm/page.h>
+#include <arch/interrupt.h>
 #include <arch/istate_struct.h>
 #include <align.h>
@@ -39,14 +40,13 @@
 
 /** Partitioning of bank 0 registers. */
-#define R_OFFS 		r16
+#define R_VECTOR	r16
 #define R_HANDLER	r17
 #define R_RET		r18
-#define R_TMP		r19
 #define R_KSTACK_BSP	r22	/* keep in sync with before_thread_runs_arch() */
 #define R_KSTACK	r23	/* keep in sync with before_thread_runs_arch() */
 
 /* Speculation vector handler */
-.macro SPECULATION_VECTOR_HANDLER offs
-    .org ivt + \offs
+.macro SPECULATION_VECTOR_HANDLER vector 
+    .org ivt + \vector * 0x100
 
     /* 1. Save predicates, IIM, IIP, IPSR and ISR CR's in bank 0 registers. */
@@ -94,7 +94,7 @@
  * @param handler Interrupt handler address.
  */
-.macro HEAVYWEIGHT_HANDLER offs, handler=universal_handler
-    .org ivt + \offs
-	mov R_OFFS = \offs
+.macro HEAVYWEIGHT_HANDLER vector, handler=exc_dispatch
+    .org ivt + \vector * 0x100
+	mov R_VECTOR = \vector
 	movl R_HANDLER = \handler ;;
 	br heavyweight_handler
@@ -165,6 +165,5 @@
 	 * copy input parameters to stack.
 	 */
-    	mov R_TMP = 0x2c00 ;;
-	cmp.eq p6, p5 = R_OFFS, R_TMP ;;
+	cmp.eq p6, p5 = EXC_BREAK_INSTRUCTION, R_VECTOR ;;
 	
 	/*
@@ -309,5 +308,5 @@
 	mov loc1 = R_RET	/* b0 belonging to interrupted context */
 	mov loc2 = R_HANDLER
-	mov out0 = R_OFFS
+	mov out0 = R_VECTOR
 	
 	add out1 = STACK_SCRATCH_AREA_SIZE, r12
@@ -543,73 +542,73 @@
 .align 32768
 ivt:
-	HEAVYWEIGHT_HANDLER 0x0000
-	HEAVYWEIGHT_HANDLER 0x0400
-	HEAVYWEIGHT_HANDLER 0x0800
-	HEAVYWEIGHT_HANDLER 0x0c00 alternate_instruction_tlb_fault
-	HEAVYWEIGHT_HANDLER 0x1000 alternate_data_tlb_fault
-	HEAVYWEIGHT_HANDLER 0x1400 data_nested_tlb_fault
-	HEAVYWEIGHT_HANDLER 0x1800
-	HEAVYWEIGHT_HANDLER 0x1c00
-	HEAVYWEIGHT_HANDLER 0x2000 data_dirty_bit_fault
-	HEAVYWEIGHT_HANDLER 0x2400 instruction_access_bit_fault
-	HEAVYWEIGHT_HANDLER 0x2800 data_access_bit_fault
-	HEAVYWEIGHT_HANDLER 0x2c00 break_instruction
-	HEAVYWEIGHT_HANDLER 0x3000 external_interrupt	/* For external interrupt, heavyweight handler is used. */
-	HEAVYWEIGHT_HANDLER 0x3400
-	HEAVYWEIGHT_HANDLER 0x3800
-	HEAVYWEIGHT_HANDLER 0x3c00
-	HEAVYWEIGHT_HANDLER 0x4000
-	HEAVYWEIGHT_HANDLER 0x4400
-	HEAVYWEIGHT_HANDLER 0x4800
-	HEAVYWEIGHT_HANDLER 0x4c00
-
-	HEAVYWEIGHT_HANDLER 0x5000 page_not_present
-	HEAVYWEIGHT_HANDLER 0x5100
-	HEAVYWEIGHT_HANDLER 0x5200
-	HEAVYWEIGHT_HANDLER 0x5300 data_access_rights_fault
-	HEAVYWEIGHT_HANDLER 0x5400 general_exception
-	HEAVYWEIGHT_HANDLER 0x5500 disabled_fp_register
-	HEAVYWEIGHT_HANDLER 0x5600
-	SPECULATION_VECTOR_HANDLER 0x5700
-	HEAVYWEIGHT_HANDLER 0x5800
-	HEAVYWEIGHT_HANDLER 0x5900
-	HEAVYWEIGHT_HANDLER 0x5a00
-	HEAVYWEIGHT_HANDLER 0x5b00
-	HEAVYWEIGHT_HANDLER 0x5c00
-	HEAVYWEIGHT_HANDLER 0x5d00 
-	HEAVYWEIGHT_HANDLER 0x5e00
-	HEAVYWEIGHT_HANDLER 0x5f00
-	
-	HEAVYWEIGHT_HANDLER 0x6000
-	HEAVYWEIGHT_HANDLER 0x6100
-	HEAVYWEIGHT_HANDLER 0x6200
-	HEAVYWEIGHT_HANDLER 0x6300
-	HEAVYWEIGHT_HANDLER 0x6400
-	HEAVYWEIGHT_HANDLER 0x6500
-	HEAVYWEIGHT_HANDLER 0x6600
-	HEAVYWEIGHT_HANDLER 0x6700
-	HEAVYWEIGHT_HANDLER 0x6800
-	HEAVYWEIGHT_HANDLER 0x6900
-	HEAVYWEIGHT_HANDLER 0x6a00
-	HEAVYWEIGHT_HANDLER 0x6b00
-	HEAVYWEIGHT_HANDLER 0x6c00
-	HEAVYWEIGHT_HANDLER 0x6d00
-	HEAVYWEIGHT_HANDLER 0x6e00
-	HEAVYWEIGHT_HANDLER 0x6f00
-
-	HEAVYWEIGHT_HANDLER 0x7000
-	HEAVYWEIGHT_HANDLER 0x7100
-	HEAVYWEIGHT_HANDLER 0x7200
-	HEAVYWEIGHT_HANDLER 0x7300
-	HEAVYWEIGHT_HANDLER 0x7400
-	HEAVYWEIGHT_HANDLER 0x7500
-	HEAVYWEIGHT_HANDLER 0x7600
-	HEAVYWEIGHT_HANDLER 0x7700
-	HEAVYWEIGHT_HANDLER 0x7800
-	HEAVYWEIGHT_HANDLER 0x7900
-	HEAVYWEIGHT_HANDLER 0x7a00
-	HEAVYWEIGHT_HANDLER 0x7b00
-	HEAVYWEIGHT_HANDLER 0x7c00
-	HEAVYWEIGHT_HANDLER 0x7d00
-	HEAVYWEIGHT_HANDLER 0x7e00
-	HEAVYWEIGHT_HANDLER 0x7f00
+	HEAVYWEIGHT_HANDLER 0x00
+	HEAVYWEIGHT_HANDLER 0x04
+	HEAVYWEIGHT_HANDLER 0x08
+	HEAVYWEIGHT_HANDLER 0x0c
+	HEAVYWEIGHT_HANDLER 0x10
+	HEAVYWEIGHT_HANDLER 0x14
+	HEAVYWEIGHT_HANDLER 0x18
+	HEAVYWEIGHT_HANDLER 0x1c
+	HEAVYWEIGHT_HANDLER 0x20
+	HEAVYWEIGHT_HANDLER 0x24
+	HEAVYWEIGHT_HANDLER 0x28
+	HEAVYWEIGHT_HANDLER 0x2c break_instruction
+	HEAVYWEIGHT_HANDLER 0x30
+	HEAVYWEIGHT_HANDLER 0x34
+	HEAVYWEIGHT_HANDLER 0x38
+	HEAVYWEIGHT_HANDLER 0x3c
+	HEAVYWEIGHT_HANDLER 0x40
+	HEAVYWEIGHT_HANDLER 0x44
+	HEAVYWEIGHT_HANDLER 0x48
+	HEAVYWEIGHT_HANDLER 0x4c
+
+	HEAVYWEIGHT_HANDLER 0x50
+	HEAVYWEIGHT_HANDLER 0x51
+	HEAVYWEIGHT_HANDLER 0x52
+	HEAVYWEIGHT_HANDLER 0x53
+	HEAVYWEIGHT_HANDLER 0x54
+	HEAVYWEIGHT_HANDLER 0x55
+	HEAVYWEIGHT_HANDLER 0x56
+	SPECULATION_VECTOR_HANDLER 0x57
+	HEAVYWEIGHT_HANDLER 0x58
+	HEAVYWEIGHT_HANDLER 0x59
+	HEAVYWEIGHT_HANDLER 0x5a
+	HEAVYWEIGHT_HANDLER 0x5b
+	HEAVYWEIGHT_HANDLER 0x5c
+	HEAVYWEIGHT_HANDLER 0x5d 
+	HEAVYWEIGHT_HANDLER 0x5e
+	HEAVYWEIGHT_HANDLER 0x5f
+	
+	HEAVYWEIGHT_HANDLER 0x60
+	HEAVYWEIGHT_HANDLER 0x61
+	HEAVYWEIGHT_HANDLER 0x62
+	HEAVYWEIGHT_HANDLER 0x63
+	HEAVYWEIGHT_HANDLER 0x64
+	HEAVYWEIGHT_HANDLER 0x65
+	HEAVYWEIGHT_HANDLER 0x66
+	HEAVYWEIGHT_HANDLER 0x67
+	HEAVYWEIGHT_HANDLER 0x68
+	HEAVYWEIGHT_HANDLER 0x69
+	HEAVYWEIGHT_HANDLER 0x6a
+	HEAVYWEIGHT_HANDLER 0x6b
+	HEAVYWEIGHT_HANDLER 0x6c
+	HEAVYWEIGHT_HANDLER 0x6d
+	HEAVYWEIGHT_HANDLER 0x6e
+	HEAVYWEIGHT_HANDLER 0x6f
+
+	HEAVYWEIGHT_HANDLER 0x70
+	HEAVYWEIGHT_HANDLER 0x71
+	HEAVYWEIGHT_HANDLER 0x72
+	HEAVYWEIGHT_HANDLER 0x73
+	HEAVYWEIGHT_HANDLER 0x74
+	HEAVYWEIGHT_HANDLER 0x75
+	HEAVYWEIGHT_HANDLER 0x76
+	HEAVYWEIGHT_HANDLER 0x77
+	HEAVYWEIGHT_HANDLER 0x78
+	HEAVYWEIGHT_HANDLER 0x79
+	HEAVYWEIGHT_HANDLER 0x7a
+	HEAVYWEIGHT_HANDLER 0x7b
+	HEAVYWEIGHT_HANDLER 0x7c
+	HEAVYWEIGHT_HANDLER 0x7d
+	HEAVYWEIGHT_HANDLER 0x7e
+	HEAVYWEIGHT_HANDLER 0x7f
