Index: arch/ia32/src/mm/frame.c
===================================================================
--- arch/ia32/src/mm/frame.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ arch/ia32/src/mm/frame.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -92,5 +92,6 @@
 		else
 			name = "invalid";
-		printf("%p %#llXB %s\n", 
+		printf("%.*p %#.16llXB %s\n", 
+			sizeof(__native) * 2,
 		       (__native) e820table[i].base_address, 
 		       (__u64) e820table[i].size,
Index: arch/ia32/src/mm/memory_init.c
===================================================================
--- arch/ia32/src/mm/memory_init.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ arch/ia32/src/mm/memory_init.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -46,5 +46,5 @@
 	
 	for (i=0;i<e820counter;i++) {
-		printf("E820 base: %#llX size: %lld type: ", e820table[i].base_address, e820table[i].size);
+		printf("E820 base: %#.16llx size: %#.16llx type: ", e820table[i].base_address, e820table[i].size);
 		switch (e820table[i].type) {
 			case MEMMAP_MEMORY_AVAILABLE: 
Index: generic/include/debug.h
===================================================================
--- generic/include/debug.h	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/include/debug.h	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -50,5 +50,5 @@
  */
 #ifdef CONFIG_DEBUG
-#	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%p\n", #expr, CALLER); }
+#	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%.*p\n", #expr, sizeof(__address) * 2, CALLER); }
 #else
 #	define ASSERT(expr)
Index: generic/src/console/cmd.c
===================================================================
--- generic/src/console/cmd.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/console/cmd.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -459,7 +459,7 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
-		printf("Calling f(): %p: %s\n", symaddr, symbol);
+		printf("Calling f(): %.*p: %s\n", sizeof(__address) * 2, symaddr, symbol);
 		f =  (__native (*)(void)) symaddr;
-		printf("Result: %p\n", f());
+		printf("Result: %#zx\n", f());
 	}
 	
@@ -483,7 +483,7 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
-		printf("Calling f(0x%zX): %p: %s\n", arg1, symaddr, symbol);
+		printf("Calling f(0x%zX): %.*p: %s\n", arg1, sizeof(__address) * 2, symaddr, symbol);
 		f =  (__native (*)(__native,...)) symaddr;
-		printf("Result: %p\n", f(arg1));
+		printf("Result: %#zx\n", f(arg1));
 	}
 	
@@ -508,8 +508,8 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
-		printf("Calling f(0x%zx,0x%zx): %p: %s\n", 
-		       arg1, arg2, symaddr, symbol);
+		printf("Calling f(0x%zx,0x%zx): %.*p: %s\n", 
+		       arg1, arg2, sizeof(__address) * 2, symaddr, symbol);
 		f =  (__native (*)(__native,__native,...)) symaddr;
-		printf("Result: %p\n", f(arg1, arg2));
+		printf("Result: %#zx\n", f(arg1, arg2));
 	}
 	
@@ -535,8 +535,8 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
-		printf("Calling f(0x%zx,0x%zx, 0x%zx): %p: %s\n", 
-		       arg1, arg2, arg3, symaddr, symbol);
+		printf("Calling f(0x%zx,0x%zx, 0x%zx): %.*p: %s\n", 
+		       arg1, arg2, arg3, sizeof(__address) * 2, symaddr, symbol);
 		f =  (__native (*)(__native,__native,__native,...)) symaddr;
-		printf("Result: %p\n", f(arg1, arg2, arg3));
+		printf("Result: %#zx\n", f(arg1, arg2, arg3));
 	}
 	
@@ -599,5 +599,5 @@
 		if (pointer)
 			addr = (__u32 *)(*(__native *)addr);
-		printf("Writing 0x%x -> %p\n", arg1, addr);
+		printf("Writing 0x%x -> %.*p\n", arg1, sizeof(__address) * 2, addr);
 		*addr = arg1;
 		
Index: generic/src/debug/print.c
===================================================================
--- generic/src/debug/print.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/debug/print.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -211,5 +211,5 @@
  *             be in range 2 .. 16).
  * @param flags output modifiers
- * @return number of written characters or negative value on fail.
+ * @return number of written characters or EOF.
  */
 static int print_number(__u64 num, int width, int precision, int base , __u64 flags)
Index: generic/src/debug/symtab.c
===================================================================
--- generic/src/debug/symtab.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/debug/symtab.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -133,5 +133,5 @@
 		addr =  __u64_le2host(symbol_table[i].address_le);
 		realname = symbol_table[i].symbol_name;
-		printf("%p: %s\n", addr, realname);
+		printf("%.*p: %s\n", sizeof(__address) * 2, addr, realname);
 		i++;
 	}
Index: generic/src/interrupt/interrupt.c
===================================================================
--- generic/src/interrupt/interrupt.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/interrupt/interrupt.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -97,6 +97,6 @@
 		if (!symbol)
 			symbol = "not found";
-		printf("%d %s %p(%s)\n", i + IVT_FIRST, exc_table[i].name,
-		       exc_table[i].f,symbol);		
+		printf("%d %s %.*p(%s)\n", i + IVT_FIRST, exc_table[i].name,
+		       sizeof(__address) * 2, exc_table[i].f,symbol);		
 		if (!((i+1) % 20)) {
 			printf("Press any key to continue.");
Index: generic/src/main/main.c
===================================================================
--- generic/src/main/main.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/main/main.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -177,5 +177,5 @@
 
 	version_print();
-	printf("%#zx: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", config.base, hardcoded_ktext_size / 1024, hardcoded_kdata_size / 1024);
+	printf("%.*p: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", sizeof(__address) * 2, config.base, hardcoded_ktext_size / 1024, hardcoded_kdata_size / 1024);
 
 	arch_pre_smp_init();
@@ -196,5 +196,5 @@
 	
 	for (i = 0; i < init.cnt; i++)
-		printf("init[%zd].addr=%p, init[%zd].size=%zd\n", i, init.tasks[i].addr, i, init.tasks[i].size);
+		printf("init[%zd].addr=%.*p, init[%zd].size=%zd\n", i, sizeof(__address)*2, init.tasks[i].addr, i, init.tasks[i].size);
 	
 	ipc_init();
Index: generic/src/mm/buddy.c
===================================================================
--- generic/src/mm/buddy.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/mm/buddy.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -292,5 +292,5 @@
 		}
 	
-		printf("#%zd\t%zd\t%zdK\t\t%zdK\t\t%zd\t", i, cnt, (cnt * (1 << i) * elem_size) >> 10, ((1 << i) * elem_size) >> 10, 1 << i);
+		printf("#%zd\t%5zd\t%7zdK\t%8zdK\t%6zd\t", i, cnt, (cnt * (1 << i) * elem_size) >> 10, ((1 << i) * elem_size) >> 10, 1 << i);
 		if (!list_empty(&b->order[i])) {
 			for (cur = b->order[i].next; cur != &b->order[i]; cur = cur->next) {
Index: generic/src/mm/frame.c
===================================================================
--- generic/src/mm/frame.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/mm/frame.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -1029,5 +1029,5 @@
 		zone = zones.info[i];
 		spinlock_lock(&zone->lock);
-		printf("%d: %#x \t%zd\t\t%zd\n", i, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
+		printf("%d: %.*p \t%10zd\t%10zd\n", i, sizeof(__address) * 2, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
 		spinlock_unlock(&zone->lock);
 	}
@@ -1061,5 +1061,5 @@
 	spinlock_lock(&zone->lock);
 	printf("Memory zone information\n");
-	printf("Zone base address: %#zX\n", PFN2ADDR(zone->base));
+	printf("Zone base address: %#.*p\n", sizeof(__address) * 2, PFN2ADDR(zone->base));
 	printf("Zone size: %zd frames (%zdK)\n", zone->count, ((zone->count) * FRAME_SIZE) >> 10);
 	printf("Allocated space: %zd frames (%zdK)\n", zone->busy_count, (zone->busy_count * FRAME_SIZE) >> 10);
Index: generic/src/mm/slab.c
===================================================================
--- generic/src/mm/slab.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/mm/slab.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -790,8 +790,8 @@
 	ipl = interrupts_disable();
 	spinlock_lock(&slab_cache_lock);
-	printf("SLAB name\tOsize\tPages\tObj/pg\tSlabs\tCached\tAllocobjs\tCtl\n");
+	printf("SLAB name\t  Osize\t  Pages\t Obj/pg\t  Slabs\t Cached\tAllocobjs\tCtl\n");
 	for (cur = slab_cache_list.next;cur!=&slab_cache_list; cur=cur->next) {
 		cache = list_get_instance(cur, slab_cache_t, link);
-		printf("%s\t%zd\t%zd\t%zd\t%zd\t%zd\t%zd\t\t%s\n", cache->name, cache->size, 
+		printf("%s\t%7zd\t%7zd\t%7zd\t%7zd\t%7zd\t%7zd\t\t%s\n", cache->name, cache->size, 
 		       (1 << cache->order), cache->objects,
 		       atomic_get(&cache->allocated_slabs),
Index: generic/src/synch/spinlock.c
===================================================================
--- generic/src/synch/spinlock.c	(revision 6ecc8bce45bcc67b6373d7dbfafad230f5b1ee01)
+++ generic/src/synch/spinlock.c	(revision ad45bde902facf893e06d19f51ac7e543fcf12f6)
@@ -70,6 +70,6 @@
 	while (test_and_set(&sl->val)) {
 		if (i++ > 300000 && sl!=&printflock) {
-			printf("cpu%d: looping on spinlock %p:%s, caller=%p",
-			       CPU->id, sl, sl->name, CALLER);
+			printf("cpu%d: looping on spinlock %.*p:%s, caller=%.*p",
+			       CPU->id, sizeof(__address) * 2, sl, sl->name, sizeof(__address) * 2, CALLER);
 			symbol = get_symtab_entry(CALLER);
 			if (symbol)
