Index: kernel/arch/ia64/src/ia64.c
===================================================================
--- kernel/arch/ia64/src/ia64.c	(revision 857c0e7a9d2cfbb243d8387e5b60e4c8acb14626)
+++ kernel/arch/ia64/src/ia64.c	(revision 743ffa6e3a5a682f9201785da96bbd88d678dea2)
@@ -51,9 +51,24 @@
 #include <syscall/syscall.h>
 #include <ddi/irq.h>
+#include <ddi/device.h>
 #include <arch/drivers/ega.h>
+#include <arch/bootinfo.h>
+#include <genarch/kbd/i8042.h>
+
+bootinfo_t *bootinfo;
 
 void arch_pre_main(void)
 {
 	/* Setup usermode init tasks. */
+
+#ifdef I460GX
+	int i;
+	init.cnt = bootinfo->taskmap.count;
+	for(i=0;i<init.cnt;i++)
+	{
+	    init.tasks[i].addr = ((unsigned long)bootinfo->taskmap.tasks[i].addr)|VRN_MASK;
+	    init.tasks[i].size = bootinfo->taskmap.tasks[i].size;
+	}
+#else	
 	init.cnt = 8;
 	init.tasks[0].addr = INIT0_ADDRESS;
@@ -73,4 +88,5 @@
 	init.tasks[7].addr = INIT0_ADDRESS + 0x1c00000;
 	init.tasks[7].size = INIT0_SIZE;
+#endif
 }
 
@@ -101,4 +117,17 @@
 {
 }
+
+
+#ifdef I460GX
+#define POLL_INTERVAL		50000		/* 50 ms */
+/** Kernel thread for polling keyboard. */
+static void i8042_kkbdpoll(void *arg)
+{
+	while (1) {
+		i8042_poll();
+		thread_usleep(POLL_INTERVAL);
+	}
+}
+#endif
 
 void arch_post_smp_init(void)
@@ -116,4 +145,19 @@
 		thread_ready(t);
 #endif		
+
+#ifdef I460GX
+		devno_t kbd = device_assign_devno();
+		devno_t mouse = device_assign_devno();
+		/* keyboard controller */
+		i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);
+
+		thread_t *t;
+		t = thread_create(i8042_kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
+		if (!t)
+			panic("cannot create kkbdpoll\n");
+		thread_ready(t);
+
+#endif
+
 	}
 }
