Index: arch/ia64/include/mm/frame.h
===================================================================
--- arch/ia64/include/mm/frame.h	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ arch/ia64/include/mm/frame.h	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -30,5 +30,5 @@
 #define __ia64_FRAME_H__
 
-#define FRAME_SIZE		2*4096
+#define FRAME_SIZE		(16*1024)
 
 extern void frame_arch_init(void);
Index: arch/ia64/src/asm.S
===================================================================
--- arch/ia64/src/asm.S	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ arch/ia64/src/asm.S	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -43,2 +43,17 @@
 memcopy:
 	br _memcopy
+
+.global memsetb
+memsetb:
+	br _memsetb
+
+.global cpu_halt
+cpu_halt:
+	br cpu_halt
+
+.global panic_printf
+panic_printf:
+	{
+		br.call.sptk.many b0=printf
+	}
+	br cpu_halt
Index: arch/ia64/src/fake.s
===================================================================
--- arch/ia64/src/fake.s	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ arch/ia64/src/fake.s	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -35,5 +35,4 @@
 .global arch_late_init
 .global cpu_arch_init
-.global cpu_halt
 .global cpu_identify
 .global cpu_print_report
@@ -45,6 +44,4 @@
 .global frame_arch_init
 .global map_page_to_frame
-.global memsetb
-.global panic_printf
 
 before_thread_runs_arch:
@@ -54,5 +51,4 @@
 arch_late_init:
 cpu_arch_init:
-cpu_halt:
 cpu_identify:
 cpu_print_report:
@@ -64,6 +60,4 @@
 frame_arch_init:
 map_page_to_frame:
-memsetb:
-panic_printf:
 	br.ret.sptk.many b0
 
Index: arch/ia64/src/ia64.c
===================================================================
--- arch/ia64/src/ia64.c	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ arch/ia64/src/ia64.c	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -32,8 +32,8 @@
 void arch_pre_mm_init(void)
 {
+	ski_init_console();
 }
 
 void arch_post_mm_init(void)
 {
-	ski_init_console();
 }
Index: arch/ia64/src/start.S
===================================================================
--- arch/ia64/src/start.S	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ arch/ia64/src/start.S	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -41,4 +41,5 @@
 	# initialize register stack
 	mov ar.rsc = r0
+	mov ar.bspstore = r0
 	loadrs
 
Index: include/config.h
===================================================================
--- include/config.h	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ include/config.h	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -39,9 +39,9 @@
 struct config {
 	__address base;
-	__u32 memory_size;
-	__u32 kernel_size;
+	size_t memory_size;
+	size_t kernel_size;
 
-	int cpu_count;
-	volatile int cpu_active;
+	count_t cpu_count;
+	volatile count_t cpu_active;
 };
 
Index: include/mm/frame.h
===================================================================
--- include/mm/frame.h	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ include/mm/frame.h	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -31,16 +31,17 @@
 
 #include <arch/types.h>
+#include <typedefs.h>
 
 #define FRAME_KA	1	/* skip frames conflicting with user address space */
 #define FRAME_PANIC	2	/* panic on failure */
 
-extern __u32 frames;
-extern __u32 frames_free;
+extern count_t frames;
+extern count_t frames_free;
 
-extern __u32 kernel_frames;
-extern __u32 kernel_frames_free;
+extern count_t kernel_frames;
+extern count_t kernel_frames_free;
 
 extern __u8 *frame_bitmap;
-extern __u32 frame_bitmap_octets;
+extern count_t frame_bitmap_octets;
 
 extern __u8 *frame_kernel_bitmap;
Index: include/mm/heap.h
===================================================================
--- include/mm/heap.h	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ include/mm/heap.h	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -41,5 +41,5 @@
 };
 
-extern void heap_init(__address heap, __u32 size);
+extern void heap_init(__address heap, size_t size);
 
 extern void *malloc(size_t size);
Index: include/typedefs.h
===================================================================
--- include/typedefs.h	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ include/typedefs.h	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -36,4 +36,5 @@
 
 typedef unsigned int size_t;
+typedef unsigned int count_t;
 
 typedef struct config config_t;
Index: src/mm/frame.c
===================================================================
--- src/mm/frame.c	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ src/mm/frame.c	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -43,9 +43,9 @@
 #include <synch/spinlock.h>
 
-__u32 frames;
-__u32 frames_free;
+count_t frames = 0;
+count_t frames_free;
 
 __u8 *frame_bitmap;
-__u32 frame_bitmap_octets;
+count_t frame_bitmap_octets;
 
 /*
@@ -54,6 +54,6 @@
  */
 __u8 *frame_kernel_bitmap;
-__u32 kernel_frames;
-__u32 kernel_frames_free;
+count_t kernel_frames;
+count_t kernel_frames_free;
 
 static spinlock_t framelock;
@@ -69,5 +69,4 @@
                 frames = config.memory_size / FRAME_SIZE;
                 frame_bitmap_octets = frames / 8 + (frames % 8 > 0);
-
                 frame_bitmap = (__u8 *) malloc(frame_bitmap_octets);
                 if (!frame_bitmap)
@@ -111,5 +110,5 @@
 	pri_t pri;
 	__u8 **frame_bitmap_ptr = &frame_bitmap;
-	__u32 *frames_ptr = &frames, *frames_free_ptr = &frames_free;
+	count_t *frames_ptr = &frames, *frames_free_ptr = &frames_free;
 	
 	if (flags & FRAME_KA) {
@@ -166,5 +165,5 @@
 	pri_t pri;
 	__u32 frame;
-	__u32 *frames_free_ptr = &frames_free, *frames_ptr = &frames;
+	count_t *frames_free_ptr = &frames_free, *frames_ptr = &frames;
 	__u8 **frame_bitmap_ptr = &frame_bitmap;
 
@@ -196,7 +195,7 @@
 			}	
 		}
-		else panic("frame_free: frame already free\n");
-	}
-	else panic("frame_free: frame number too big\n");
+		else panic("frame already free\n");
+	}
+	else panic("frame number too big\n");
 	
 	spinlock_unlock(&framelock);
@@ -212,5 +211,5 @@
 	pri_t pri;
 	__u32 frame;
-	__u32 *frames_ptr = &frames, *frames_free_ptr = &frames_free;
+	count_t *frames_ptr = &frames, *frames_free_ptr = &frames_free;
 	__u8 **frame_bitmap_ptr = &frame_bitmap;
 	
Index: src/mm/heap.c
===================================================================
--- src/mm/heap.c	(revision 87cb9e23b30ef01a53a4e81a1976ef1bae6418df)
+++ src/mm/heap.c	(revision 2b50d7c97571beca347155c17a3ce02b7ccae21b)
@@ -43,5 +43,5 @@
 static spinlock_t heaplock;
 
-void heap_init(__address heap, __u32 size)
+void heap_init(__address heap, size_t size)
 {
 	spinlock_initialize(&heaplock);
@@ -63,5 +63,5 @@
 
 	if (size == 0)
-		panic("malloc: zero-size allocation request");
+		panic("zero-size allocation request");
 		
 	x = chunk0;
