Index: arch/ia64/Makefile.inc
===================================================================
--- arch/ia64/Makefile.inc	(revision 33ccb2cbb62c342dd41a73ca709f49a28162e301)
+++ arch/ia64/Makefile.inc	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -15,4 +15,6 @@
 LFLAGS=-EL -M -T ../arch/ia64/_link.ld
 
+
+
 arch_sources= \
 	arch/start.S \
@@ -23,3 +25,6 @@
 	arch/fpu_context.c \
 	arch/context.S \
-	arch/ski/ski.c
+	arch/ski/ski.c \
+	arch/cpu/cpu.c \
+	arch/ivt.S \
+	arch/interrupt_handler.c
Index: arch/ia64/src/cpu/cpu.c
===================================================================
--- arch/ia64/src/cpu/cpu.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
+++ arch/ia64/src/cpu/cpu.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -0,0 +1,36 @@
+#include <cpu.h>
+#include <print.h>
+#include <panic.h>
+
+extern int IVT;
+
+
+
+
+void cpu_arch_init(void)
+{
+
+
+
+    int *p=&IVT;
+
+
+	__asm__ (
+		"mov r15 = %0;;"
+		"mov cr2 = r15;;"
+		: 
+		: "r" (p)
+		: "r15"
+	);
+
+}
+
+
+void gugux_pokus(void);
+void gugux_pokus(void)
+{
+    panic("\n\nGUGUX Exception\n\n");
+}
+
+
+
Index: arch/ia64/src/dummy.s
===================================================================
--- arch/ia64/src/dummy.s	(revision 33ccb2cbb62c342dd41a73ca709f49a28162e301)
+++ arch/ia64/src/dummy.s	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -34,5 +34,4 @@
 .global before_thread_runs_arch
 .global arch_late_init
-.global cpu_arch_init
 .global cpu_identify
 .global cpu_print_report
@@ -50,5 +49,4 @@
 asm_delay_loop:
 arch_late_init:
-cpu_arch_init:
 cpu_identify:
 cpu_print_report:
Index: arch/ia64/src/interrupt_handler.c
===================================================================
--- arch/ia64/src/interrupt_handler.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
+++ arch/ia64/src/interrupt_handler.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2005 Jakub Vana
+ * 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 <panic.h>
+
+
+void general_exception(void);
+void general_exception(void)
+{
+    panic("\nGeneral Exception\n");
+}
+
+
+
+void break_instruction(void);
+void break_instruction(void)
+{
+    panic("\nBreak Instruction\n");
+}
+
Index: arch/ia64/src/ivt.S
===================================================================
--- arch/ia64/src/ivt.S	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
+++ arch/ia64/src/ivt.S	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2005 Jakub Vana
+# 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.
+#
+
+
+
+.macro Handler o h
+.org IVT + \o
+br \h;;
+.endm
+
+
+
+.global IVT
+.align 32768
+IVT:
+
+Handler 0x2c00 break_instruction
+Handler 0x5400 general_exception
+
+
+
+
+.align 32768
+.byte 0
Index: arch/mips/src/putchar.c
===================================================================
--- arch/mips/src/putchar.c	(revision 33ccb2cbb62c342dd41a73ca709f49a28162e301)
+++ arch/mips/src/putchar.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -35,8 +35,8 @@
 void putchar(const char ch)
 {
-	__u32 status = cp0_status_read();
+//	__u32 status = cp0_status_read();
 	
-	cp0_status_write(cp0_status_read() | cp0_status_erl_error_bit);
+//	cp0_status_write(cp0_status_read() | cp0_status_erl_error_bit);
 	*((char *) VIDEORAM) = ch;
-	cp0_status_write(status);
+//	cp0_status_write(status);
 }
Index: src/Makefile.config
===================================================================
--- src/Makefile.config	(revision 33ccb2cbb62c342dd41a73ca709f49a28162e301)
+++ src/Makefile.config	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -21,5 +21,5 @@
 
 # Uncomment if you want to run in the test mode
-#TEST=__TEST__
+TEST=__TEST__
 
 TEST_FILE=test.c
Index: src/main/main.c
===================================================================
--- src/main/main.c	(revision 33ccb2cbb62c342dd41a73ca709f49a28162e301)
+++ src/main/main.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -158,4 +158,5 @@
 
 	cpu_init();
+	
 	calibrate_delay_loop();
 	
Index: src/proc/scheduler.c
===================================================================
--- src/proc/scheduler.c	(revision 33ccb2cbb62c342dd41a73ca709f49a28162e301)
+++ src/proc/scheduler.c	(revision d2bb9f8a111b1aebb99a97f7a643311460462e4b)
@@ -363,5 +363,9 @@
 	}
 
+	printf("Ahoj");
 	THREAD = find_best_thread();
+//	putchar('@');
+	printf("Lidi");	
+//	printf("*1*");
 	
 	spinlock_lock(&THREAD->lock);
