Index: kernel/arch/ia64/src/debug/stacktrace.c
===================================================================
--- kernel/arch/ia64/src/debug/stacktrace.c	(revision 070e05aa939a4cbaed698ba35f5d2f7a7efee35c)
+++ kernel/arch/ia64/src/debug/stacktrace.c	(revision 070e05aa939a4cbaed698ba35f5d2f7a7efee35c)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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.
+ */
+
+/** @addtogroup ia64
+ * @{
+ */
+/** @file
+ */
+
+#include <stacktrace.h>
+#include <syscall/copy.h>
+#include <arch/types.h>
+#include <typedefs.h>
+
+bool kernel_frame_pointer_validate(uintptr_t fp)
+{
+	return false;
+}
+
+bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
+{
+	return false;
+}
+
+bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra)
+{
+	return false;
+}
+
+bool uspace_frame_pointer_validate(uintptr_t fp)
+{
+	return false;
+}
+
+bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
+{
+	return false;
+}
+
+bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra)
+{
+	return false;
+}
+
+/** @}
+ */
Index: kernel/arch/ia64/src/debug/stacktrace_asm.S
===================================================================
--- kernel/arch/ia64/src/debug/stacktrace_asm.S	(revision 070e05aa939a4cbaed698ba35f5d2f7a7efee35c)
+++ kernel/arch/ia64/src/debug/stacktrace_asm.S	(revision 070e05aa939a4cbaed698ba35f5d2f7a7efee35c)
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2010 Jakub Jermar
+# 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.
+#
+
+.text
+
+.global frame_pointer_get
+.global program_counter_get
+
+frame_pointer_get:
+	mov r8 = r0
+	br.ret.sptk.many b0
+
+program_counter_get:
+	mov r8 = r0
+	br.ret.sptk.many b0
Index: kernel/arch/ia64/src/mm/page.c
===================================================================
--- kernel/arch/ia64/src/mm/page.c	(revision 03a447629f9551ddecdf060bfcbf8b615b241e55)
+++ kernel/arch/ia64/src/mm/page.c	(revision 070e05aa939a4cbaed698ba35f5d2f7a7efee35c)
@@ -71,26 +71,12 @@
 
 	/*
-	 * First set up kernel region register.
-	 * This is redundant (see start.S) but we keep it here just for sure.
-	 */
-	rr.word = rr_read(VRN_KERNEL);
-	rr.map.ve = 0;                  /* disable VHPT walker */
-	rr.map.ps = PAGE_WIDTH;
-	rr.map.rid = ASID2RID(ASID_KERNEL, VRN_KERNEL);
-	rr_write(VRN_KERNEL, rr.word);
-	srlz_i();
-	srlz_d();
-
-	/*
-	 * And setup the rest of region register.
+	 * Set up kernel region registers.
+	 * VRN_KERNEL has already been set in start.S.
+	 * For paranoia reasons, we set it again.
 	 */
 	for(i = 0; i < REGION_REGISTERS; i++) {
-		/* skip kernel rr */
-		if (i == VRN_KERNEL)
-			continue;
-	
 		rr.word = rr_read(i);
 		rr.map.ve = 0;		/* disable VHPT walker */
-		rr.map.rid = RID_KERNEL;
+		rr.map.rid = ASID2RID(ASID_KERNEL, i);
 		rr.map.ps = PAGE_WIDTH;
 		rr_write(i, rr.word);
Index: kernel/arch/ia64/src/start.S
===================================================================
--- kernel/arch/ia64/src/start.S	(revision 03a447629f9551ddecdf060bfcbf8b615b241e55)
+++ kernel/arch/ia64/src/start.S	(revision 070e05aa939a4cbaed698ba35f5d2f7a7efee35c)
@@ -74,5 +74,5 @@
 	movl r10 = (RR_MASK)
 	and r9 = r10, r9
-	movl r10 = ((RID_KERNEL << RID_SHIFT) | (KERNEL_PAGE_WIDTH << PS_SHIFT))
+	movl r10 = (((RID_KERNEL7) << RID_SHIFT) | (KERNEL_PAGE_WIDTH << PS_SHIFT))
 	or r9 = r10, r9
 	
