Index: boot/arch/arm32/src/main.c
===================================================================
--- boot/arch/arm32/src/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ boot/arch/arm32/src/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -61,5 +61,6 @@
 	printf(" %p|%p: bootstrap page table\n", &boot_pt, &boot_pt);
 	printf(" %p|%p: boot info structure\n", &bootinfo, &bootinfo);
-	printf(" %p|%p: kernel entry point\n", PA2KA(BOOT_OFFSET), BOOT_OFFSET);
+	printf(" %p|%p: kernel entry point\n",
+	    (void *) PA2KA(BOOT_OFFSET), (void *) BOOT_OFFSET);
 	
 	size_t i;
Index: boot/arch/ia64/src/main.c
===================================================================
--- boot/arch/ia64/src/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ boot/arch/ia64/src/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -62,10 +62,12 @@
 	
 	printf(" %p|%p: boot info structure\n", &bootinfo, &bootinfo);
-	printf(" %p|%p: kernel entry point\n", KERNEL_ADDRESS, KERNEL_ADDRESS);
-	printf(" %p|%p: loader entry point\n", LOADER_ADDRESS, LOADER_ADDRESS);
+	printf(" %p|%p: kernel entry point\n",
+	    (void *) KERNEL_ADDRESS, (void *) KERNEL_ADDRESS);
+	printf(" %p|%p: loader entry point\n",
+	    (void *) LOADER_ADDRESS, (void *) LOADER_ADDRESS);
 	
 	size_t i;
 	for (i = 0; i < COMPONENTS; i++)
-		printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].start,
+		printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
 		    components[i].start, components[i].name,
 		    components[i].inflated, components[i].size);
Index: boot/arch/mips32/src/main.c
===================================================================
--- boot/arch/mips32/src/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ boot/arch/mips32/src/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -51,14 +51,19 @@
 	
 	printf("\nMemory statistics\n");
-	printf(" %p|%p: CPU map\n", PA2KA(CPUMAP_OFFSET), CPUMAP_OFFSET);
-	printf(" %p|%p: bootstrap stack\n", PA2KA(STACK_OFFSET), STACK_OFFSET);
-	printf(" %p|%p: boot info structure\n", PA2KA(BOOTINFO_OFFSET), BOOTINFO_OFFSET);
-	printf(" %p|%p: kernel entry point\n", PA2KA(BOOT_OFFSET), BOOT_OFFSET);
-	printf(" %p|%p: bootloader entry point\n", PA2KA(LOADER_OFFSET), LOADER_OFFSET);
+	printf(" %p|%p: CPU map\n", (void *) PA2KA(CPUMAP_OFFSET),
+	    (void *) CPUMAP_OFFSET);
+	printf(" %p|%p: bootstrap stack\n", (void *) PA2KA(STACK_OFFSET),
+	    (void *) STACK_OFFSET);
+	printf(" %p|%p: boot info structure\n",
+	    (void *) PA2KA(BOOTINFO_OFFSET), (void *) BOOTINFO_OFFSET);
+	printf(" %p|%p: kernel entry point\n", (void *) PA2KA(BOOT_OFFSET),
+	    (void *) BOOT_OFFSET);
+	printf(" %p|%p: bootloader entry point\n",
+	    (void *) PA2KA(LOADER_OFFSET), (void *) LOADER_OFFSET);
 	
 	size_t i;
 	for (i = 0; i < COMPONENTS; i++)
-		printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].start,
-		    KSEG2PA(components[i].start), components[i].name,
+		printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
+		    (void *) KSEG2PA(components[i].start), components[i].name,
 		    components[i].inflated, components[i].size);
 	
@@ -91,5 +96,5 @@
 		if (tail >= ((void *) PA2KA(LOADER_OFFSET))) {
 			printf("\n%s: Image too large to fit (%p >= %p), halting.\n",
-			    components[i].name, tail, PA2KA(LOADER_OFFSET));
+			    components[i].name, tail, (void *) PA2KA(LOADER_OFFSET));
 			halt();
 		}
Index: boot/arch/ppc32/src/main.c
===================================================================
--- boot/arch/ppc32/src/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ boot/arch/ppc32/src/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -68,10 +68,12 @@
 	printf(" %p|%p: real mode trampoline\n", &real_mode, real_mode_pa);
 	printf(" %p|%p: boot info structure\n", &bootinfo, bootinfo_pa);
-	printf(" %p|%p: kernel entry point\n", PA2KA(BOOT_OFFSET), BOOT_OFFSET);
-	printf(" %p|%p: loader entry point\n", LOADER_ADDRESS, loader_address_pa);
+	printf(" %p|%p: kernel entry point\n",
+	    (void *) PA2KA(BOOT_OFFSET), (void *) BOOT_OFFSET);
+	printf(" %p|%p: loader entry point\n",
+	    (void *) LOADER_ADDRESS, loader_address_pa);
 	
 	size_t i;
 	for (i = 0; i < COMPONENTS; i++)
-		printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].start,
+		printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
 		    ofw_translate(components[i].start), components[i].name,
 		    components[i].inflated, components[i].size);
Index: boot/arch/sparc64/src/main.c
===================================================================
--- boot/arch/sparc64/src/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ boot/arch/sparc64/src/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -209,13 +209,15 @@
 	void *loader_address_pa = ofw_translate((void *) LOADER_ADDRESS);
 	
-	printf("\nMemory statistics (total %llu MB, starting at %p)\n",
-	    bootinfo.memmap.total >> 20, bootinfo.physmem_start);
-	printf(" %p|%p: boot info structure\n", &bootinfo, bootinfo_pa);
-	printf(" %p|%p: kernel entry point\n", KERNEL_ADDRESS, kernel_address_pa);
-	printf(" %p|%p: loader entry point\n", LOADER_ADDRESS, loader_address_pa);
+	printf("\nMemory statistics (total %" PRIu64 " MB, starting at %p)\n",
+	    bootinfo.memmap.total >> 20, (void *) bootinfo.physmem_start);
+	printf(" %p|%p: boot info structure\n", &bootinfo, (void *) bootinfo_pa);
+	printf(" %p|%p: kernel entry point\n",
+	    (void *) KERNEL_ADDRESS, (void *) kernel_address_pa);
+	printf(" %p|%p: loader entry point\n",
+	    (void *) LOADER_ADDRESS, (void *) loader_address_pa);
 	
 	size_t i;
 	for (i = 0; i < COMPONENTS; i++)
-		printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].start,
+		printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
 		    ofw_translate(components[i].start), components[i].name,
 		    components[i].inflated, components[i].size);
Index: boot/genarch/src/ofw.c
===================================================================
--- boot/genarch/src/ofw.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ boot/genarch/src/ofw.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -243,5 +243,5 @@
 	void *addr = ofw_claim_virt_internal(virt, len, 0);
 	if (addr != virt) {
-		printf("Error: Unable to claim virtual memory %p (size %u), halting.\n",
+		printf("Error: Unable to claim virtual memory %p (size %zu), halting.\n",
 		    virt, len);
 		halt();
@@ -254,5 +254,5 @@
 	
 	if (addr == NULL) {
-		printf("Error: Unable to claim %u bytes in virtual memory, halting.\n",
+		printf("Error: Unable to claim %zu bytes in virtual memory, halting.\n",
 		    len);
 		halt();
@@ -305,5 +305,5 @@
 	void *addr = ofw_claim_phys_internal(phys, len, 0);
 	if (addr != phys) {
-		printf("Error: Unable to claim physical memory %p (size %u), halting.\n",
+		printf("Error: Unable to claim physical memory %p (size %zu), halting.\n",
 		    phys, len);
 		halt();
@@ -315,5 +315,5 @@
 	void *addr = ofw_claim_phys_internal(NULL, len, alignment);
 	if (addr == NULL) {
-		printf("Error: Unable to claim %u bytes in physical memory, halting.\n",
+		printf("Error: Unable to claim %zu bytes in physical memory, halting.\n",
 		    len);
 		halt();
@@ -343,5 +343,5 @@
 	
 	if (ret != 0) {
-		printf("Error: Unable to map %p to %p (size %u), halting.\n",
+		printf("Error: Unable to map %p to %p (size %zu), halting.\n",
 		    virt, phys, size);
 		halt();
Index: kernel/arch/amd64/src/debugger.c
===================================================================
--- kernel/arch/amd64/src/debugger.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/amd64/src/debugger.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -230,14 +230,14 @@
 				return;
 			
-			printf("*** Found ZERO on address %" PRIp " (slot %d) ***\n",
-			    breakpoints[slot].address, slot);
+			printf("*** Found ZERO on address %p (slot %d) ***\n",
+			    (void *) breakpoints[slot].address, slot);
 		} else {
-			printf("Data watchpoint - new data: %" PRIp "\n",
+			printf("Data watchpoint - new data: %#" PRIxn "\n",
 			    *((unative_t *) breakpoints[slot].address));
 		}
 	}
 	
-	printf("Reached breakpoint %d:%" PRIp " (%s)\n", slot, getip(istate),
-	    symtab_fmt_name_lookup(getip(istate)));
+	printf("Reached breakpoint %d:%p (%s)\n", slot,
+	    (void *) getip(istate), symtab_fmt_name_lookup(getip(istate)));
 	
 #ifdef CONFIG_KCONSOLE
@@ -363,12 +363,12 @@
 			
 #ifdef __32_BITS__
-			printf("%-4u %7" PRIs " %p %s\n", i,
-			    breakpoints[i].counter, breakpoints[i].address,
+			printf("%-4u %7zu %p %s\n", i,
+			    breakpoints[i].counter, (void *) breakpoints[i].address,
 			    symbol);
 #endif
 			
 #ifdef __64_BITS__
-			printf("%-4u %7" PRIs " %p %s\n", i,
-			    breakpoints[i].counter, breakpoints[i].address,
+			printf("%-4u %7zu %p %s\n", i,
+			    breakpoints[i].counter, (void *) breakpoints[i].address,
 			    symbol);
 #endif
@@ -405,7 +405,8 @@
 		flags = BKPOINT_WRITE;
 	
-	printf("Adding breakpoint on address: %p\n", argv->intval);
-	
-	int id = breakpoint_add((void *)argv->intval, flags, -1);
+	printf("Adding breakpoint on address: %p\n",
+	    (void *) argv->intval);
+	
+	int id = breakpoint_add((void *) argv->intval, flags, -1);
 	if (id < 0)
 		printf("Add breakpoint failed.\n");
Index: kernel/arch/amd64/src/interrupt.c
===================================================================
--- kernel/arch/amd64/src/interrupt.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/amd64/src/interrupt.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -65,18 +65,28 @@
 void istate_decode(istate_t *istate)
 {
-	printf("cs =%p\trip=%p\trfl=%p\terr=%p\n",
-	    istate->cs, istate->rip, istate->rflags, istate->error_word);
-
+	printf("cs =%#0" PRIx64 "\trip=%p\t"
+	    "rfl=%#0" PRIx64 "\terr=%#0" PRIx64 "\n",
+	    istate->cs, (void *) istate->rip,
+	    istate->rflags, istate->error_word);
+	
 	if (istate_from_uspace(istate))
-		printf("ss =%p\n", istate->ss);
-	
-	printf("rax=%p\trbx=%p\trcx=%p\trdx=%p\n",
+		printf("ss =%#0" PRIx64 "\n", istate->ss);
+	
+	printf("rax=%#0" PRIx64 "\trbx=%#0" PRIx64 "\t"
+	    "rcx=%#0" PRIx64 "\trdx=%#0" PRIx64 "\n",
 	    istate->rax, istate->rbx, istate->rcx, istate->rdx);
+	
 	printf("rsi=%p\trdi=%p\trbp=%p\trsp=%p\n",
-	    istate->rsi, istate->rdi, istate->rbp,
-	    istate_from_uspace(istate) ? istate->rsp : (uintptr_t)&istate->rsp);
-	printf("r8 =%p\tr9 =%p\tr10=%p\tr11=%p\n",
+	    (void *) istate->rsi, (void *) istate->rdi,
+	    (void *) istate->rbp,
+	    istate_from_uspace(istate) ? ((void *) istate->rsp) :
+	    &istate->rsp);
+	
+	printf("r8 =%#0" PRIx64 "\tr9 =%#0" PRIx64 "\t"
+	    "r10=%#0" PRIx64 "\tr11=%#0" PRIx64 "\n",
 	    istate->r8, istate->r9, istate->r10, istate->r11);
-	printf("r12=%p\tr13=%p\tr14=%p\tr15=%p\n",
+	
+	printf("r12=%#0" PRIx64 "\tr13=%#0" PRIx64 "\t"
+	    "r14=%#0" PRIx64 "\tr15=%#0" PRIx64 "\n",
 	    istate->r12, istate->r13, istate->r14, istate->r15);
 }
Index: kernel/arch/amd64/src/mm/page.c
===================================================================
--- kernel/arch/amd64/src/mm/page.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/amd64/src/mm/page.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -89,5 +89,5 @@
 	
 	if (as_page_fault(page, access, istate) == AS_PF_FAULT) {
-		fault_if_from_uspace(istate, "Page fault: %#x.", page);
+		fault_if_from_uspace(istate, "Page fault: %p.", (void *) page);
 		panic_memtrap(istate, access, page, NULL);
 	}
@@ -97,6 +97,6 @@
 {
 	if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
-		panic("Unable to map physical memory %p (%" PRIs " bytes).", physaddr,
-		    size);
+		panic("Unable to map physical memory %p (%zu bytes).",
+		    (void *) physaddr, size);
 	
 	uintptr_t virtaddr = PA2KA(last_frame);
Index: kernel/arch/arm32/src/exception.c
===================================================================
--- kernel/arch/arm32/src/exception.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/arm32/src/exception.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -175,12 +175,17 @@
 void istate_decode(istate_t *istate)
 {
-	printf("r0 =%#0.8lx\tr1 =%#0.8lx\tr2 =%#0.8lx\tr3 =%#0.8lx\n",
+	printf("r0 =%#0" PRIx32 "\tr1 =%#0" PRIx32 "\t"
+	    "r2 =%#0" PRIx32 "\tr3 =%#0" PRIx32 "\n",
 	    istate->r0, istate->r1, istate->r2, istate->r3);
-	printf("r4 =%#0.8lx\tr5 =%#0.8lx\tr6 =%#0.8lx\tr7 =%#0.8lx\n",
+	printf("r4 =%#" PRIx32 "\tr5 =%#0" PRIx32 "\t"
+	    "r6 =%#0" PRIx32 "\tr7 =%#0" PRIx32 "\n",
 	    istate->r4, istate->r5, istate->r6, istate->r7);
-	printf("r8 =%#0.8lx\tr9 =%#0.8lx\tr10=%#0.8lx\tfp =%#0.8lx\n",
-	    istate->r8, istate->r9, istate->r10, istate->fp);
-	printf("r12=%#0.8lx\tsp =%#0.8lx\tlr =%#0.8lx\tspsr=%#0.8lx\n",
-	    istate->r12, istate->sp, istate->lr, istate->spsr);
+	printf("r8 =%#0" PRIx32 "\tr9 =%#0" PRIx32 "\t"
+	    "r10=%#0" PRIx32 "\tfp =%p\n",
+	    istate->r8, istate->r9, istate->r10,
+	    (void *) istate->fp);
+	printf("r12=%#0" PRIx32 "\tsp =%p\tlr =%p\tspsr=%p\n",
+	    istate->r12, (void *) istate->sp,
+	    (void *) istate->lr, (void *) istate->spsr);
 }
 
Index: kernel/arch/arm32/src/mm/page.c
===================================================================
--- kernel/arch/arm32/src/mm/page.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/arm32/src/mm/page.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -93,5 +93,5 @@
 	    KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) {
 		panic("Unable to map physical memory %p (%d bytes).",
-		    physaddr, size);
+		    (void *) physaddr, size);
 	}
 	
Index: kernel/arch/arm32/src/mm/page_fault.c
===================================================================
--- kernel/arch/arm32/src/mm/page_fault.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/arm32/src/mm/page_fault.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -141,5 +141,6 @@
 	if (instr.condition == 0xf) {
 		panic("page_fault - instruction does not access memory "
-		    "(instr_code: %x, badvaddr:%x).", instr, badvaddr);
+		    "(instr_code: %#0" PRIx32 ", badvaddr:%p).",
+		    instr_union.pc, (void *) badvaddr);
 		return PF_ACCESS_EXEC;
 	}
@@ -160,5 +161,6 @@
 
 	panic("page_fault - instruction doesn't access memory "
-	    "(instr_code: %x, badvaddr:%x).", instr, badvaddr);
+	    "(instr_code: %#0" PRIx32 ", badvaddr:%p).",
+	    instr_union.pc, (void *) badvaddr);
 
 	return PF_ACCESS_EXEC;
Index: kernel/arch/ia32/src/interrupt.c
===================================================================
--- kernel/arch/ia32/src/interrupt.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ia32/src/interrupt.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -65,17 +65,25 @@
 void istate_decode(istate_t *istate)
 {
-	printf("cs =%p\teip=%p\tefl=%p\terr=%p\n",
-	    istate->cs, istate->eip, istate->eflags, istate->error_word);
-
-	printf("ds =%p\tes =%p\tfs =%p\tgs =%p\n",
+	printf("cs =%#0" PRIx32 "\teip=%p\t"
+	    "efl=%#0" PRIx32 "\terr=%#0" PRIx32 "\n",
+	    istate->cs, (void *) istate->eip,
+	    istate->eflags, istate->error_word);
+	
+	printf("ds =%#0" PRIx32 "\tes =%#0" PRIx32 "\t"
+	    "fs =%#0" PRIx32 "\tgs =%#0" PRIx32 "\n",
 	    istate->ds, istate->es, istate->fs, istate->gs);
+	
 	if (istate_from_uspace(istate))
-		printf("ss =%p\n", istate->ss);
-
-	printf("eax=%p\tebx=%p\tecx=%p\tedx=%p\n",
+		printf("ss =%#0" PRIx32 "\n", istate->ss);
+	
+	printf("eax=%#0" PRIx32 "\tebx=%#0" PRIx32 "\t"
+	    "ecx=%#0" PRIx32 "\tedx=%#0" PRIx32 "\n",
 	    istate->eax, istate->ebx, istate->ecx, istate->edx);
+	
 	printf("esi=%p\tedi=%p\tebp=%p\tesp=%p\n",
-	    istate->esi, istate->edi, istate->ebp,
-	    istate_from_uspace(istate) ? istate->esp : (uintptr_t)&istate->esp);
+	    (void *) istate->esi, (void *) istate->edi,
+	    (void *) istate->ebp,
+	    istate_from_uspace(istate) ? ((void *) istate->esp) :
+	    &istate->esp);
 }
 
@@ -139,7 +147,7 @@
 	);
 	
-	fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR=%#0.8x.",
-	    (unative_t) mxcsr);
-	panic_badtrap(istate, n, "SIMD FP exception, MXCSR=%#0.8x");
+	fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR=%#0" PRIx32 ".",
+	    mxcsr);
+	panic_badtrap(istate, n, "SIMD FP exception");
 }
 
Index: kernel/arch/ia32/src/mm/page.c
===================================================================
--- kernel/arch/ia32/src/mm/page.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ia32/src/mm/page.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -82,5 +82,6 @@
 {
 	if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
-		panic("Unable to map physical memory %p (%d bytes).", physaddr, size);
+		panic("Unable to map physical memory %p (%zu bytes).",
+		    (void *) physaddr, size);
 	
 	uintptr_t virtaddr = PA2KA(last_frame);
Index: kernel/arch/ia32/src/smp/apic.c
===================================================================
--- kernel/arch/ia32/src/smp/apic.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ia32/src/smp/apic.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -477,5 +477,5 @@
 {
 #ifdef LAPIC_VERBOSE
-	printf("LVT on cpu%" PRIs ", LAPIC ID: %" PRIu8 "\n",
+	printf("LVT on cpu%u, LAPIC ID: %" PRIu8 "\n",
 	    CPU->id, l_apic_id());
 	
Index: kernel/arch/ia64/src/interrupt.c
===================================================================
--- kernel/arch/ia64/src/interrupt.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ia64/src/interrupt.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -135,18 +135,19 @@
 void istate_decode(istate_t *istate)
 {
-	printf("ar.bsp=%p\tar.bspstore=%p\n", istate->ar_bsp,
-	    istate->ar_bspstore);
-	printf("ar.rnat=%#018llx\tar.rsc=%#018llx\n", istate->ar_rnat,
-	    istate->ar_rsc);
-	printf("ar.ifs=%#018llx\tar.pfs=%#018llx\n", istate->ar_ifs,
-	    istate->ar_pfs);
-	printf("cr.isr=%#018llx\tcr.ipsr=%#018llx\t\n", istate->cr_isr.value,
-	    istate->cr_ipsr);
-	
-	printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei,
+	printf("ar.bsp=%p\tar.bspstore=%p\n",
+	    (void *) istate->ar_bsp, (void *) istate->ar_bspstore);
+	printf("ar.rnat=%#0" PRIx64 "\tar.rsc=%#0" PRIx64 "\n",
+	    istate->ar_rnat, istate->ar_rsc);
+	printf("ar.ifs=%#0" PRIx64 "\tar.pfs=%#0" PRIx64 "\n",
+	    istate->ar_ifs, istate->ar_pfs);
+	printf("cr.isr=%#0" PRIx64 "\tcr.ipsr=%#0" PRIx64 "\n",
+	    istate->cr_isr.value, istate->cr_ipsr.value);
+	
+	printf("cr.iip=%#0" PRIx64 ", #%u\t(%s)\n",
+	    istate->cr_iip, istate->cr_isr.ei,
 	    symtab_fmt_name_lookup(istate->cr_iip));
-	printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa,
+	printf("cr.iipa=%#0" PRIx64 "\t(%s)\n", istate->cr_iipa,
 	    symtab_fmt_name_lookup(istate->cr_iipa));
-	printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa,
+	printf("cr.ifa=%#0" PRIx64 "\t(%s)\n", istate->cr_ifa,
 	    symtab_fmt_name_lookup(istate->cr_ifa));
 }
Index: kernel/arch/ia64/src/mm/tlb.c
===================================================================
--- kernel/arch/ia64/src/mm/tlb.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ia64/src/mm/tlb.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -499,5 +499,6 @@
 		page_table_unlock(AS, true);
 		if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
-			fault_if_from_uspace(istate, "Page fault at %p.", va);
+			fault_if_from_uspace(istate, "Page fault at %p.",
+			    (void *) va);
 			panic_memtrap(istate, PF_ACCESS_EXEC, va, NULL);
 		}
@@ -556,5 +557,5 @@
 			} else {
 				fault_if_from_uspace(istate,
-				    "IO access fault at %p.", va);
+				    "IO access fault at %p.", (void *) va);
 			}
 		}
@@ -620,5 +621,6 @@
 		 */
 		if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
-			fault_if_from_uspace(istate, "Page fault at %p.", va);
+			fault_if_from_uspace(istate, "Page fault at %p.",
+			    (void *) va);
 			panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, NULL);
 		}
@@ -668,5 +670,6 @@
 	} else {
 		if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
-			fault_if_from_uspace(istate, "Page fault at %p.", va);
+			fault_if_from_uspace(istate, "Page fault at %p.",
+			    (void *) va);
 			panic_memtrap(istate, PF_ACCESS_WRITE, va, NULL);
 		}
@@ -704,5 +707,6 @@
 	} else {
 		if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
-			fault_if_from_uspace(istate, "Page fault at %p.", va);
+			fault_if_from_uspace(istate, "Page fault at %p.",
+			    (void *) va);
 			panic_memtrap(istate, PF_ACCESS_EXEC, va, NULL);
 		}
@@ -740,5 +744,6 @@
 	} else {
 		if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
-			fault_if_from_uspace(istate, "Page fault at %p.", va);
+			fault_if_from_uspace(istate, "Page fault at %p.",
+			    (void *) va);
 			panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, NULL);
 		}
@@ -772,5 +777,6 @@
 	ASSERT(!t->w);
 	if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
-		fault_if_from_uspace(istate, "Page fault at %p.", va);
+		fault_if_from_uspace(istate, "Page fault at %p.",
+		    (void *) va);
 		panic_memtrap(istate, PF_ACCESS_WRITE, va, NULL);
 	}
@@ -812,5 +818,6 @@
 		page_table_unlock(AS, true);
 		if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
-			fault_if_from_uspace(istate, "Page fault at %p.", va);
+			fault_if_from_uspace(istate, "Page fault at %p.",
+			    (void *) va);
 			panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, NULL);
 		}
Index: kernel/arch/mips32/src/cache.c
===================================================================
--- kernel/arch/mips32/src/cache.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/mips32/src/cache.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -39,5 +39,5 @@
 void cache_error(istate_t *istate)
 {
-	panic("cache_error exception (epc=%p).", istate->epc);
+	panic("cache_error exception (epc=%p).", (void *) istate->epc);
 }
 
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/mips32/src/debugger.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -191,5 +191,5 @@
 	}
 	
-	printf("Adding breakpoint on address %p\n", argv->intval);
+	printf("Adding breakpoint on address %p\n", (void *) argv->intval);
 	
 	cur->address = (uintptr_t) argv->intval;
@@ -267,6 +267,6 @@
 			    breakpoints[i].address);
 			
-			printf("%-4u %7" PRIs " %p %-8s %-9s %-10s %s\n", i,
-			    breakpoints[i].counter, breakpoints[i].address,
+			printf("%-4u %7zu %p %-8s %-9s %-10s %s\n", i,
+			    breakpoints[i].counter, (void *) breakpoints[i].address,
 			    ((breakpoints[i].flags & BKPOINT_INPROG) ? "true" :
 			    "false"), ((breakpoints[i].flags & BKPOINT_ONESHOT)
@@ -366,5 +366,6 @@
 		
 		if (!(cur->flags & BKPOINT_FUNCCALL)) {
-			printf("***Breakpoint %u: %p in %s.\n", i, fireaddr,
+			printf("***Breakpoint %u: %p in %s.\n", i,
+			    (void *) fireaddr,
 			    symtab_fmt_name_lookup(fireaddr));
 		}
@@ -381,5 +382,6 @@
 		cur->flags |= BKPOINT_INPROG;
 	} else {
-		printf("***Breakpoint %d: %p in %s.\n", i, fireaddr,
+		printf("***Breakpoint %d: %p in %s.\n", i,
+		    (void *) fireaddr,
 		    symtab_fmt_name_lookup(fireaddr));
 		
Index: kernel/arch/mips32/src/exception.c
===================================================================
--- kernel/arch/mips32/src/exception.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/mips32/src/exception.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -74,22 +74,40 @@
 void istate_decode(istate_t *istate)
 {
-	printf("epc=%p\tsta=%p\tlo =%p\thi =%p\n",
-	    istate->epc, istate->status, istate->lo, istate->hi);
-	printf("a0 =%p\ta1 =%p\ta2 =%p\ta3 =%p\n",
+	printf("epc=%p\tsta=%#0" PRIx32 "\t"
+	    "lo =%#0" PRIx32 "\thi =%#0" PRIx32 "\n",
+	    (void *) istate->epc, istate->status,
+	    istate->lo, istate->hi);
+	
+	printf("a0 =%#0" PRIx32 "\ta1 =%#0" PRIx32 "\t"
+	    "a2 =%#0" PRIx32 "\ta3 =%#0" PRIx32 "\n",
 	    istate->a0, istate->a1, istate->a2, istate->a3);
-	printf("t0 =%p\tt1 =%p\tt2 =%p\tt3 =%p\n",
+	
+	printf("t0 =%#0" PRIx32 "\tt1 =%#0" PRIx32 "\t"
+	    "t2 =%#0" PRIx32 "\tt3 =%#0" PRIx32 "\n",
 	    istate->t0, istate->t1, istate->t2, istate->t3);
-	printf("t4 =%p\tt5 =%p\tt6 =%p\tt7 =%p\n",
+	
+	printf("t4 =%#0" PRIx32 "\tt5 =%#0" PRIx32 "\t"
+	    "t6 =%#0" PRIx32 "\tt7 =%#0" PRIx32 "\n",
 	    istate->t4, istate->t5, istate->t6, istate->t7);
-	printf("t8 =%p\tt9 =%p\tv0 =%p\tv1 =%p\n",
+	
+	printf("t8 =%#0" PRIx32 "\tt9 =%#0" PRIx32 "\t"
+	    "v0 =%#0" PRIx32 "\tv1 =%#0" PRIx32 "\n",
 	    istate->t8, istate->t9, istate->v0, istate->v1);
-	printf("s0 =%p\ts1 =%p\ts2 =%p\ts3 =%p\n",
+	
+	printf("s0 =%#0" PRIx32 "\ts1 =%#0" PRIx32 "\t"
+	    "s2 =%#0" PRIx32 "\ts3 =%#0" PRIx32 "\n",
 	    istate->s0, istate->s1, istate->s2, istate->s3);
-	printf("s4 =%p\ts5 =%p\ts6 =%p\ts7 =%p\n",
+	
+	printf("s4 =%#0" PRIx32 "\ts5 =%#0" PRIx32 "\t"
+	    "s6 =%#0" PRIx32 "\ts7 =%#0" PRIx32 "\n",
 	    istate->s4, istate->s5, istate->s6, istate->s7);
-	printf("s8 =%p\tat =%p\tkt0=%p\tkt1=%p\n",
+	
+	printf("s8 =%#0" PRIx32 "\tat =%#0" PRIx32 "\t"
+	    "kt0=%#0" PRIx32 "\tkt1=%#0" PRIx32 "\n",
 	    istate->s8, istate->at, istate->kt0, istate->kt1);
+	
 	printf("sp =%p\tra =%p\tgp =%p\n",
-	    istate->sp, istate->ra, istate->gp);
+	    (void *) istate->sp, (void *) istate->ra,
+	    (void *) istate->gp);
 }
 
Index: kernel/arch/mips32/src/mm/tlb.c
===================================================================
--- kernel/arch/mips32/src/mm/tlb.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/mips32/src/mm/tlb.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -323,5 +323,6 @@
 	uintptr_t va = cp0_badvaddr_read();
 	
-	fault_if_from_uspace(istate, "TLB Refill Exception on %p.", va);
+	fault_if_from_uspace(istate, "TLB Refill Exception on %p.",
+	    (void *) va);
 	panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Refill Exception.");
 }
@@ -332,5 +333,6 @@
 	uintptr_t va = cp0_badvaddr_read();
 	
-	fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", va);
+	fault_if_from_uspace(istate, "TLB Invalid Exception on %p.",
+	    (void *) va);
 	panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Invalid Exception.");
 }
@@ -340,5 +342,6 @@
 	uintptr_t va = cp0_badvaddr_read();
 	
-	fault_if_from_uspace(istate, "TLB Modified Exception on %p.", va);
+	fault_if_from_uspace(istate, "TLB Modified Exception on %p.",
+	    (void *) va);
 	panic_memtrap(istate, PF_ACCESS_WRITE, va, "TLB Modified Exception.");
 }
Index: kernel/arch/ppc32/src/cpu/cpu.c
===================================================================
--- kernel/arch/ppc32/src/cpu/cpu.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ppc32/src/cpu/cpu.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -68,5 +68,5 @@
 	}
 	
-	printf("cpu%" PRIs ": version=%" PRIu16" (%s), revision=%" PRIu16 "\n", cpu->id,
+	printf("cpu%u: version=%" PRIu16" (%s), revision=%" PRIu16 "\n", cpu->id,
 	    cpu->arch.version, name, cpu->arch.revision);
 }
Index: kernel/arch/ppc32/src/interrupt.c
===================================================================
--- kernel/arch/ppc32/src/interrupt.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ppc32/src/interrupt.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -54,26 +54,44 @@
 void istate_decode(istate_t *istate)
 {
-	printf("r0 =%p\tr1 =%p\tr2 =%p\n", istate->r0, istate->sp, istate->r2);
-	printf("r3 =%p\tr4 =%p\tr5 =%p\n", istate->r3, istate->r4, istate->r5);
-	printf("r6 =%p\tr7 =%p\tr8 =%p\n", istate->r6, istate->r7, istate->r8);
-	printf("r9 =%p\tr10=%p\tr11=%p\n",
+	printf("r0 =%#0" PRIx32 "\tr1 =%p\tr2 =%#0" PRIx32 "\n",
+	    istate->r0, (void *) istate->sp, istate->r2);
+	
+	printf("r3 =%#0" PRIx32 "\tr4 =%#0" PRIx32 "\tr5 =%#0" PRIx32 "\n",
+	    istate->r3, istate->r4, istate->r5);
+	
+	printf("r6 =%#0" PRIx32 "\tr7 =%#0" PRIx32 "\tr8 =%#0" PRIx32 "\n",
+	    istate->r6, istate->r7, istate->r8);
+	
+	printf("r9 =%#0" PRIx32 "\tr10=%#0" PRIx32 "\tr11=%#0" PRIx32 "\n",
 	    istate->r9, istate->r10, istate->r11);
-	printf("r12=%p\tr13=%p\tr14=%p\n",
+	
+	printf("r12=%#0" PRIx32 "\tr13=%#0" PRIx32 "\tr14=%#0" PRIx32 "\n",
 	    istate->r12, istate->r13, istate->r14);
-	printf("r15=%p\tr16=%p\tr17=%p\n",
+	
+	printf("r15=%#0" PRIx32 "\tr16=%#0" PRIx32 "\tr17=%#0" PRIx32 "\n",
 	    istate->r15, istate->r16, istate->r17);
-	printf("r18=%p\tr19=%p\tr20=%p\n",
+	
+	printf("r18=%#0" PRIx32 "\tr19=%#0" PRIx32 "\tr20=%#0" PRIx32 "\n",
 	    istate->r18, istate->r19, istate->r20);
-	printf("r21=%p\tr22=%p\tr23=%p\n",
+	
+	printf("r21=%#0" PRIx32 "\tr22=%#0" PRIx32 "\tr23=%#0" PRIx32 "\n",
 	    istate->r21, istate->r22, istate->r23);
-	printf("r24=%p\tr25=%p\tr26=%p\n",
+	
+	printf("r24=%#0" PRIx32 "\tr25=%#0" PRIx32 "\tr26=%#0" PRIx32 "\n",
 	    istate->r24, istate->r25, istate->r26);
-	printf("r27=%p\tr28=%p\tr29=%p\n",
+	
+	printf("r27=%#0" PRIx32 "\tr28=%#0" PRIx32 "\tr29=%#0" PRIx32 "\n",
 	    istate->r27, istate->r28, istate->r29);
-	printf("r30=%p\tr31=%p\n", istate->r30, istate->r31);
-	printf("cr =%p\tpc =%p\tlr =%p\n", istate->cr, istate->pc, istate->lr);
-	printf("ctr=%p\txer=%p\tdar=%p\n",
+	
+	printf("r30=%#0" PRIx32 "\tr31=%#0" PRIx32 "\n",
+	    istate->r30, istate->r31);
+	
+	printf("cr =%#0" PRIx32 "\tpc =%p\tlr =%p\n",
+	    istate->cr, (void *) istate->pc, (void *) istate->lr);
+	
+	printf("ctr=%#0" PRIx32 "\txer=%#0" PRIx32 "\tdar=%#0" PRIx32 "\n",
 	    istate->ctr, istate->xer, istate->dar);
-	printf("srr1=%p\n", istate->srr1);
+	
+	printf("srr1=%p\n", (void *) istate->srr1);
 }
 
@@ -111,5 +129,5 @@
 			 */
 #ifdef CONFIG_DEBUG
-			printf("cpu%" PRIs ": spurious interrupt (inum=%" PRIu8 ")\n",
+			printf("cpu%u: spurious interrupt (inum=%" PRIu8 ")\n",
 			    CPU->id, inum);
 #endif
Index: kernel/arch/ppc32/src/mm/frame.c
===================================================================
--- kernel/arch/ppc32/src/mm/frame.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ppc32/src/mm/frame.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -49,5 +49,5 @@
 	size_t i;
 	for (i = 0; i < memmap.cnt; i++) {
-		printf("%#10x %#10x\n", memmap.zones[i].start,
+		printf("%p %#0zx\n", memmap.zones[i].start,
 		    memmap.zones[i].size);
 	}
Index: kernel/arch/ppc32/src/mm/page.c
===================================================================
--- kernel/arch/ppc32/src/mm/page.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ppc32/src/mm/page.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -49,6 +49,6 @@
 	if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
 	    KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
-		panic("Unable to map physical memory %p (%" PRIs " bytes).",
-		    physaddr, size);
+		panic("Unable to map physical memory %p (%zu bytes).",
+		    (void *) physaddr, size);
 	
 	uintptr_t virtaddr = PA2KA(last_frame);
Index: kernel/arch/ppc32/src/mm/tlb.c
===================================================================
--- kernel/arch/ppc32/src/mm/tlb.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/ppc32/src/mm/tlb.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -111,5 +111,6 @@
 static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate)
 {
-	fault_if_from_uspace(istate, "PHT Refill Exception on %p.", badvaddr);
+	fault_if_from_uspace(istate, "PHT Refill Exception on %p.",
+	    (void *) badvaddr);
 	panic_memtrap(istate, PF_ACCESS_UNKNOWN, badvaddr,
 	    "PHT Refill Exception.");
@@ -459,11 +460,11 @@
 		length = 0; \
 	\
-	printf(name ": page=%.*p frame=%.*p length=%d KB (mask=%#x)%s%s\n", \
-	    sizeof(upper) * 2, upper & 0xffff0000, sizeof(lower) * 2, \
-	    lower & 0xffff0000, length, mask, \
+	printf(name ": page=%#0" PRIx32 " frame=%#0" PRIx32 \
+	    " length=%#0" PRIx32 " KB (mask=%#0" PRIx32 ")%s%s\n", \
+	    upper & UINT32_C(0xffff0000), lower & UINT32_C(0xffff0000), \
+	    length, mask, \
 	    ((upper >> 1) & 1) ? " supervisor" : "", \
 	    (upper & 1) ? " user" : "");
 
-
 void tlb_print(void)
 {
@@ -473,6 +474,7 @@
 		uint32_t vsid = sr_get(sr << 28);
 		
-		printf("sr[%02u]: vsid=%.*p (asid=%u)%s%s\n", sr,
-		    sizeof(vsid) * 2, vsid & 0xffffff, (vsid & 0xffffff) >> 4,
+		printf("sr[%02" PRIu32 "]: vsid=%#0" PRIx32 " (asid=%" PRIu32 ")"
+		    "%s%s\n", sr, vsid & UINT32_C(0x00ffffff),
+		    (vsid & UINT32_C(0x00ffffff)) >> 4,
 		    ((vsid >> 30) & 1) ? " supervisor" : "",
 		    ((vsid >> 29) & 1) ? " user" : "");
Index: kernel/arch/sparc64/src/console.c
===================================================================
--- kernel/arch/sparc64/src/console.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/sparc64/src/console.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -70,5 +70,5 @@
 	ofw_tree_node_t *screen = ofw_tree_lookup(prop_scr->value);
 	if (!screen)
-		panic("Cannot find %s.", prop_scr->value);
+		panic("Cannot find %s.", (char *) prop_scr->value);
 	
 	scr_init(screen);
@@ -83,5 +83,5 @@
 	ofw_tree_node_t *keyboard = ofw_tree_lookup(prop_kbd->value);
 	if (!keyboard)
-		panic("Cannot find %s.", prop_kbd->value);
+		panic("Cannot find %s.", (char *) prop_kbd->value);
 	
 	kbd_init(keyboard);
Index: kernel/arch/sparc64/src/drivers/pci.c
===================================================================
--- kernel/arch/sparc64/src/drivers/pci.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/sparc64/src/drivers/pci.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -211,5 +211,6 @@
 		 * Unsupported model.
 		 */
-		printf("Unsupported PCI controller model (%s).\n", prop->value);
+		printf("Unsupported PCI controller model (%s).\n",
+		    (char *) prop->value);
 	}
 
Index: kernel/arch/sparc64/src/mm/sun4u/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -360,7 +360,7 @@
 static void print_tlb_entry(int i, tlb_tag_read_reg_t t, tlb_data_t d)
 {
-	printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
-	    "ie=%d, soft2=%#x, pfn=%#x, soft=%#x, l=%d, "
-	    "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
+	printf("%u: vpn=%#" PRIx64 ", context=%u, v=%u, size=%u, nfo=%u, "
+	    "ie=%u, soft2=%#x, pfn=%#x, soft=%#x, l=%u, "
+	    "cp=%u, cv=%u, e=%u, p=%u, w=%u, g=%u\n", i, (uint64_t) t.vpn,
 	    t.context, d.v, d.size, d.nfo, d.ie, d.soft2,
 	    d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
@@ -441,5 +441,5 @@
     uintptr_t va, const char *str)
 {
-	fault_if_from_uspace(istate, "%s, Address=%p.", str, va);
+	fault_if_from_uspace(istate, "%s, address=%p.", str, (void *) va);
 	panic_memtrap(istate, PF_ACCESS_EXEC, va, str);
 }
@@ -451,6 +451,6 @@
 
 	va = tag.vpn << MMU_PAGE_WIDTH;
-	fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str, va,
-	    tag.context);
+	fault_if_from_uspace(istate, "%s, page=%p (asid=%u).", str,
+	    (void *) va, tag.context);
 	panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, str);
 }
@@ -462,6 +462,6 @@
 
 	va = tag.vpn << MMU_PAGE_WIDTH;
-	fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str, va,
-	    tag.context);
+	fault_if_from_uspace(istate, "%s, page=%p (asid=%u).", str,
+	    (void *) va, tag.context);
 	panic_memtrap(istate, PF_ACCESS_WRITE, va, str);
 }
@@ -484,6 +484,6 @@
 	    sfsr.e, sfsr.ct, sfsr.pr, sfsr.w, sfsr.ow, sfsr.fv);
 #endif
-	    
-	printf("DTLB SFAR: address=%p\n", sfar);
+	
+	printf("DTLB SFAR: address=%p\n", (void *) sfar);
 	
 	dtlb_sfsr_write(0);
@@ -508,5 +508,5 @@
 #endif
 	    
-	printf("DTLB SFAR: address=%p\n", sfar);
+	printf("DTLB SFAR: address=%p\n", (void *) sfar);
 	
 	dtlb_sfsr_write(0);
Index: kernel/arch/sparc64/src/mm/sun4v/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -358,5 +358,6 @@
     const char *str)
 {
-	fault_if_from_uspace(istate, "%s, Address=%p.", str, va);
+	fault_if_from_uspace(istate, "%s, address=%p.", str,
+	    (void *) va);
 	panic_memtrap(istate, PF_ACCESS_EXEC, va, str);
 }
@@ -365,6 +366,6 @@
     uint64_t page_and_ctx, const char *str)
 {
-	fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str,
-	    DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
+	fault_if_from_uspace(istate, "%s, page=%p (asid=%" PRId64 ").", str,
+	    (void *) DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
 	panic_memtrap(istate, PF_ACCESS_UNKNOWN, DMISS_ADDRESS(page_and_ctx),
 	    str);
@@ -374,6 +375,6 @@
     uint64_t page_and_ctx, const char *str)
 {
-	fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str,
-	    DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
+	fault_if_from_uspace(istate, "%s, page=%p (asid=%" PRId64 ").", str,
+	    (void *) DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
 	panic_memtrap(istate, PF_ACCESS_WRITE, DMISS_ADDRESS(page_and_ctx),
 	    str);
@@ -399,7 +400,6 @@
 	uint64_t errno =  __hypercall_fast3(MMU_DEMAP_ALL, 0, 0,
 		MMU_FLAG_DTLB | MMU_FLAG_ITLB);
-	if (errno != HV_EOK) {
-		panic("Error code = %d.\n", errno);
-	}
+	if (errno != HV_EOK)
+		panic("Error code = %" PRIu64 ".\n", errno);
 }
 
Index: kernel/arch/sparc64/src/sun4v/md.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/md.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/sparc64/src/sun4v/md.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -310,6 +310,6 @@
 	retval = retval;
 	if (retval != HV_EOK) {
-		printf("Could not retrieve machine description, error = %d.\n",
-		    retval);
+		printf("Could not retrieve machine description, "
+		    "error=%" PRIu64 ".\n", retval);
 	}
 }
Index: kernel/arch/sparc64/src/trap/sun4v/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -87,5 +87,5 @@
 		KA2PA(cpu_mondo_queues[CPU->id]),
 		CPU_MONDO_NENTRIES) != HV_EOK)
-			panic("Initializing mondo queue failed on CPU %d.\n",
+			panic("Initializing mondo queue failed on CPU %" PRIu64 ".\n",
 			    CPU->arch.id);
 }
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/include/synch/spinlock.h	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -146,5 +146,5 @@
 	if ((pname)++ > (value)) { \
 		(pname) = 0; \
-		printf("Deadlock probe %s: exceeded threshold %u\n", \
+		printf("Deadlock probe %s: exceeded threshold %u\n" \
 		    "cpu%u: function=%s, line=%u\n", \
 		    #pname, (value), CPU->id, __func__, __LINE__); \
Index: kernel/generic/src/cpu/cpu.c
===================================================================
--- kernel/generic/src/cpu/cpu.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/cpu/cpu.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -107,5 +107,5 @@
 void cpu_list(void)
 {
-	size_t i;
+	unsigned int i;
 	
 	for (i = 0; i < config.cpu_count; i++) {
Index: kernel/generic/src/debug/debug.c
===================================================================
--- kernel/generic/src/debug/debug.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/debug/debug.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -52,8 +52,8 @@
 	if (symtab_name_lookup((uintptr_t) call_site, &call_site_sym,
 	    &call_site_off) == EOK)
-		printf("%s+%" PRIp "->%s\n", call_site_sym, call_site_off,
-		    fn_sym);
+		printf("%s()+%p->%s()\n", call_site_sym,
+		    (void *) call_site_off, fn_sym);
 	else
-		printf("->%s\n", fn_sym);
+		printf("->%s()\n", fn_sym);
 }
 
@@ -67,8 +67,8 @@
 	if (symtab_name_lookup((uintptr_t) call_site, &call_site_sym,
 	    &call_site_off) == EOK)
-		printf("%s+%" PRIp "<-%s\n", call_site_sym, call_site_off,
-		    fn_sym);
+		printf("%s()+%p<-%s()\n", call_site_sym,
+		    (void *) call_site_off, fn_sym);
 	else
-		printf("<-%s\n", fn_sym);
+		printf("<-%s()\n", fn_sym);
 }
 
Index: kernel/generic/src/debug/panic.c
===================================================================
--- kernel/generic/src/debug/panic.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/debug/panic.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -42,23 +42,27 @@
 #include <interrupt.h>
 
+#define BANNER_LEFT   "######>"
+#define BANNER_RIGHT  "<######"
+
 void panic_common(panic_category_t cat, istate_t *istate, int access,
     uintptr_t address, const char *fmt, ...)
 {
 	va_list args;
-
+	
 	silent = false;
-
-	printf("\nKERNEL PANIC ");
+	
+	printf("\n%s Kernel panic ", BANNER_LEFT);
 	if (CPU)
-		printf("ON cpu%d ", CPU->id);
-	printf("DUE TO ");
-
+		printf("on cpu%u ", CPU->id);
+	printf("due to ");
+	
 	va_start(args, fmt);
 	if (cat == PANIC_ASSERT) {
-		printf("A FAILED ASSERTION:\n");
+		printf("a failed assertion: %s\n", BANNER_RIGHT);
 		vprintf(fmt, args);
 		printf("\n");
 	} else if (cat == PANIC_BADTRAP) {
-		printf("BAD TRAP %ld.\n", address);
+		printf("bad trap %" PRIun ". %s\n", address,
+		    BANNER_RIGHT);
 		if (fmt) {
 			vprintf(fmt, args);
@@ -66,14 +70,15 @@
 		}
 	} else if (cat == PANIC_MEMTRAP) {
-		printf("A BAD MEMORY ACCESS WHILE ");
+		printf("a bad memory access while ");
 		if (access == PF_ACCESS_READ)
-			printf("LOADING FROM");
+			printf("loading from");
 		else if (access == PF_ACCESS_WRITE)
-			printf("STORING TO");
+			printf("storing to");
 		else if (access == PF_ACCESS_EXEC)
-			printf("BRANCHING TO");
+			printf("branching to");
 		else
-			printf("REFERENCING");
-		printf(" ADDRESS %p.\n", address); 
+			printf("referencing");
+		printf(" address %p. %s\n", (void *) address,
+		    BANNER_RIGHT);
 		if (fmt) {
 			vprintf(fmt, args);
@@ -81,17 +86,18 @@
 		}
 	} else {
-		printf("THE FOLLOWING REASON:\n");
+		printf("the following reason: %s\n",
+		    BANNER_RIGHT);
 		vprintf(fmt, args);
 		printf("\n");
 	}
 	va_end(args);
-
+	
 	printf("\n");
-
+	
 	if (istate) {
 		istate_decode(istate);
 		printf("\n");
 	}
-
+	
 	stack_trace();
 	halt();
Index: kernel/generic/src/debug/stacktrace.c
===================================================================
--- kernel/generic/src/debug/stacktrace.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/debug/stacktrace.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -41,6 +41,5 @@
 #define STACK_FRAMES_MAX	20
 
-void
-stack_trace_ctx(stack_trace_ops_t *ops, stack_trace_context_t *ctx)
+void stack_trace_ctx(stack_trace_ops_t *ops, stack_trace_context_t *ctx)
 {
 	int cnt = 0;
@@ -54,17 +53,18 @@
 		if (ops->symbol_resolve &&
 		    ops->symbol_resolve(ctx->pc, &symbol, &offset)) {
-		    	if (offset)
-				printf("%p: %s+%" PRIp "()\n",
-				    ctx->fp, symbol, offset);
+			if (offset)
+				printf("%p: %s()+%p\n", (void *) ctx->fp,
+				    symbol, (void *) offset);
 			else
-				printf("%p: %s()\n",
-				    ctx->fp, symbol);
-		} else {
-			printf("%p: %p()\n", ctx->fp, ctx->pc);
-		}
+				printf("%p: %s()\n", (void *) ctx->fp, symbol);
+		} else
+			printf("%p: %p()\n", (void *) ctx->fp, (void *) ctx->pc);
+		
 		if (!ops->return_address_get(ctx, &pc))
 			break;
+		
 		if (!ops->frame_pointer_prev(ctx, &fp))
 			break;
+		
 		ctx->fp = fp;
 		ctx->pc = pc;
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/debug/symtab.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -192,5 +192,5 @@
 		uintptr_t addr = uint64_t_le2host(symbol_table[pos].address_le);
 		char *realname = symbol_table[pos].symbol_name;
-		printf("%p: %s\n", addr, realname);
+		printf("%p: %s\n", (void *) addr, realname);
 		pos++;
 	}
Index: kernel/generic/src/interrupt/interrupt.c
===================================================================
--- kernel/generic/src/interrupt/interrupt.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/interrupt/interrupt.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -176,5 +176,5 @@
 	printf("Task %s (%" PRIu64 ") killed due to an exception at "
 	    "program counter %p.\n", TASK->name, TASK->taskid,
-	    istate_get_pc(istate));
+	    (void *) istate_get_pc(istate));
 	
 	stack_trace_istate(istate);
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/ipc/ipc.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -702,10 +702,10 @@
 	for (i = 0; i < IPC_MAX_PHONES; i++) {
 		if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) {
-			printf("%d: mutex busy\n", i);
+			printf("%zu: mutex busy\n", i);
 			continue;
 		}
 		
 		if (task->phones[i].state != IPC_PHONE_FREE) {
-			printf("%" PRIs ": ", i);
+			printf("%zu: ", i);
 			
 			switch (task->phones[i].state) {
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/main/kinit.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -129,5 +129,5 @@
 		 * For each CPU, create its load balancing thread.
 		 */
-		size_t i;
+		unsigned int i;
 		
 		for (i = 0; i < config.cpu_count; i++) {
@@ -139,5 +139,5 @@
 				thread_ready(thread);
 			} else
-				printf("Unable to create kcpulb thread for cpu" PRIs "\n", i);
+				printf("Unable to create kcpulb thread for cpu%u\n", i);
 		}
 	}
@@ -179,5 +179,5 @@
 	for (i = 0; i < init.cnt; i++) {
 		if (init.tasks[i].addr % FRAME_SIZE) {
-			printf("init[%" PRIs "].addr is not frame aligned\n", i);
+			printf("init[%zu].addr is not frame aligned\n", i);
 			programs[i].task = NULL;
 			continue;
@@ -219,5 +219,5 @@
 			
 			if (rd != RE_OK)
-				printf("Init binary %" PRIs " not used (error %d)\n", i, rd);
+				printf("Init binary %zu not used (error %d)\n", i, rd);
 		}
 	}
Index: kernel/generic/src/main/main.c
===================================================================
--- kernel/generic/src/main/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/main/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -183,6 +183,6 @@
 	version_print();
 	
-	LOG("\nconfig.base=%p config.kernel_size=%" PRIs
-	    "\nconfig.stack_base=%p config.stack_size=%" PRIs,
+	LOG("\nconfig.base=%p config.kernel_size=%zu"
+	    "\nconfig.stack_base=%p config.stack_size=%zu",
 	    config.base, config.kernel_size, config.stack_base,
 	    config.stack_size);
@@ -225,5 +225,5 @@
 	slab_enable_cpucache();
 	
-	printf("Detected %" PRIs " CPU(s), %" PRIu64" MiB free memory\n",
+	printf("Detected %u CPU(s), %" PRIu64 " MiB free memory\n",
 	    config.cpu_count, SIZE2MB(zones_total_size()));
 	
@@ -241,7 +241,6 @@
 		size_t i;
 		for (i = 0; i < init.cnt; i++)
-			LOG("init[%" PRIs "].addr=%p, init[%" PRIs
-			    "].size=%" PRIs, i, init.tasks[i].addr, i,
-			    init.tasks[i].size);
+			LOG("init[%zu].addr=%p, init[%zu].size=%zu",
+			    i, init.tasks[i].addr, i, init.tasks[i].size);
 	} else
 		printf("No init binaries found.\n");
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/mm/as.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -1811,6 +1811,6 @@
 	}
 	
-	panic("Inconsistency detected while adding %" PRIs " pages of used "
-	    "space at %p.", count, page);
+	panic("Inconsistency detected while adding %zu pages of used "
+	    "space at %p.", count, (void *) page);
 }
 
@@ -1991,6 +1991,6 @@
 	
 error:
-	panic("Inconsistency detected while removing %" PRIs " pages of used "
-	    "space from %p.", count, page);
+	panic("Inconsistency detected while removing %zu pages of used "
+	    "space from %p.", count, (void *) page);
 }
 
@@ -2105,7 +2105,8 @@
 			
 			mutex_lock(&area->lock);
-			printf("as_area: %p, base=%p, pages=%" PRIs
-			    " (%p - %p)\n", area, area->base, area->pages,
-			    area->base, area->base + FRAMES2SIZE(area->pages));
+			printf("as_area: %p, base=%p, pages=%zu"
+			    " (%p - %p)\n", area, (void *) area->base,
+			    area->pages, (void *) area->base,
+			    (void *) (area->base + FRAMES2SIZE(area->pages)));
 			mutex_unlock(&area->lock);
 		}
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/mm/frame.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -145,8 +145,9 @@
 			    (!iswithin(zones.info[i].base, zones.info[i].count,
 			    base, count))) {
-				printf("Zone (%p, %p) overlaps with previous zone (%p, %p)!\n",
-				    PFN2ADDR(base), PFN2ADDR(count),
-				    PFN2ADDR(zones.info[i].base),
-				    PFN2ADDR(zones.info[i].count));
+				printf("Zone (%p, %p) overlaps "
+				    "with previous zone (%p %p)!\n",
+				    (void *) PFN2ADDR(base), (void *) PFN2ADDR(count),
+				    (void *) PFN2ADDR(zones.info[i].base),
+				    (void *) PFN2ADDR(zones.info[i].count));
 			}
 			
@@ -1049,6 +1050,6 @@
 		
 #ifdef CONFIG_DEBUG
-		printf("Thread %" PRIu64 " waiting for %" PRIs " frames, "
-		    "%" PRIs " available.\n", THREAD->tid, size, avail);
+		printf("Thread %" PRIu64 " waiting for %zu frames, "
+		    "%zu available.\n", THREAD->tid, size, avail);
 #endif
 		
@@ -1297,15 +1298,15 @@
 		bool available = zone_flags_available(flags);
 		
-		printf("%-4" PRIs, i);
+		printf("%-4zu", i);
 		
 #ifdef __32_BITS__
-		printf("  %10p", base);
+		printf("  %p", (void *) base);
 #endif
 		
 #ifdef __64_BITS__
-		printf(" %18p", base);
+		printf(" %p", (void *) base);
 #endif
 		
-		printf(" %12" PRIs " %c%c%c      ", count,
+		printf(" %12zu %c%c%c      ", count,
 		    available ? 'A' : ' ',
 		    (flags & ZONE_RESERVED) ? 'R' : ' ',
@@ -1313,5 +1314,5 @@
 		
 		if (available)
-			printf("%14" PRIs " %14" PRIs,
+			printf("%14zu %14zu",
 			    free_count, busy_count);
 		
@@ -1354,7 +1355,7 @@
 	bool available = zone_flags_available(flags);
 	
-	printf("Zone number:       %" PRIs "\n", znum);
-	printf("Zone base address: %p\n", base);
-	printf("Zone size:         %" PRIs " frames (%" PRIs " KiB)\n", count,
+	printf("Zone number:       %zu\n", znum);
+	printf("Zone base address: %p\n", (void *) base);
+	printf("Zone size:         %zu frames (%zu KiB)\n", count,
 	    SIZE2KB(FRAMES2SIZE(count)));
 	printf("Zone flags:        %c%c%c\n",
@@ -1364,7 +1365,7 @@
 	
 	if (available) {
-		printf("Allocated space:   %" PRIs " frames (%" PRIs " KiB)\n",
+		printf("Allocated space:   %zu frames (%zu KiB)\n",
 		    busy_count, SIZE2KB(FRAMES2SIZE(busy_count)));
-		printf("Available space:   %" PRIs " frames (%" PRIs " KiB)\n",
+		printf("Available space:   %zu frames (%zu KiB)\n",
 		    free_count, SIZE2KB(FRAMES2SIZE(free_count)));
 	}
Index: kernel/generic/src/mm/slab.c
===================================================================
--- kernel/generic/src/mm/slab.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/mm/slab.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -890,5 +890,5 @@
 		irq_spinlock_unlock(&slab_cache_lock, true);
 		
-		printf("%-18s %8" PRIs " %8u %8" PRIs " %8ld %8ld %8ld %-5s\n",
+		printf("%-18s %8zu %8u %8zu %8ld %8ld %8ld %-5s\n",
 		    name, size, (1 << order), objects, allocated_slabs,
 		    cached_objs, allocated_objs,
Index: kernel/generic/src/proc/program.c
===================================================================
--- kernel/generic/src/proc/program.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/proc/program.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -145,6 +145,6 @@
 		
 		program_loader = image_addr;
-		LOG("Registered program loader at 0x%" PRIp,
-		    image_addr);
+		LOG("Registered program loader at %p",
+		    (void *) image_addr);
 		
 		return EOK;
Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/proc/scheduler.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -727,5 +727,5 @@
 		irq_spinlock_lock(&cpus[cpu].lock, true);
 		
-		printf("cpu%u: address=%p, nrdy=%ld, needs_relink=%" PRIs "\n",
+		printf("cpu%u: address=%p, nrdy=%" PRIua ", needs_relink=%zu\n",
 		    cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy),
 		    cpus[cpu].needs_relink);
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/proc/task.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -478,5 +478,5 @@
 #ifdef __32_BITS__
 	if (*additional)
-		printf("%-8" PRIu64 " %9lu %7lu", task->taskid,
+		printf("%-8" PRIu64 " %9" PRIua " %7" PRIua, task->taskid,
 		    atomic_get(&task->refcount), atomic_get(&task->active_calls));
 	else
@@ -489,5 +489,6 @@
 #ifdef __64_BITS__
 	if (*additional)
-		printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c %9lu %7lu",
+		printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c "
+		    "%9" PRIua " %7" PRIua,
 		    task->taskid, ucycles, usuffix, kcycles, ksuffix,
 		    atomic_get(&task->refcount), atomic_get(&task->active_calls));
@@ -501,5 +502,5 @@
 		for (i = 0; i < IPC_MAX_PHONES; i++) {
 			if (task->phones[i].callee)
-				printf(" %" PRIs ":%p", i, task->phones[i].callee);
+				printf(" %zu:%p", i, task->phones[i].callee);
 		}
 		printf("\n");
Index: kernel/generic/src/synch/spinlock.c
===================================================================
--- kernel/generic/src/synch/spinlock.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/synch/spinlock.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -102,7 +102,7 @@
 		
 		if (i++ > DEADLOCK_THRESHOLD) {
-			printf("cpu%u: looping on spinlock %" PRIp ":%s, "
-			    "caller=%" PRIp "(%s)\n", CPU->id, lock, lock->name,
-			    CALLER, symtab_fmt_name_lookup(CALLER));
+			printf("cpu%u: looping on spinlock %p:%s, "
+			    "caller=%p (%s)\n", CPU->id, lock, lock->name,
+			    (void *) CALLER, symtab_fmt_name_lookup(CALLER));
 			
 			i = 0;
Index: kernel/generic/src/sysinfo/sysinfo.c
===================================================================
--- kernel/generic/src/sysinfo/sysinfo.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/generic/src/sysinfo/sysinfo.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -494,5 +494,5 @@
 			break;
 		case SYSINFO_VAL_DATA:
-			printf("+ %s (%" PRIs" bytes)\n", cur->name,
+			printf("+ %s (%zu bytes)\n", cur->name,
 			    cur->val.data.size);
 			break;
@@ -505,5 +505,5 @@
 			/* N.B.: No data was actually returned (only a dry run) */
 			(void) cur->val.fn_data(cur, &size, true);
-			printf("+ %s (%" PRIs" bytes) [generated]\n", cur->name,
+			printf("+ %s (%zu bytes) [generated]\n", cur->name,
 			    size);
 			break;
Index: kernel/test/avltree/avltree1.c
===================================================================
--- kernel/test/avltree/avltree1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/avltree/avltree1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -202,5 +202,5 @@
 	avltree_create(tree);
 	
-	TPRINTF("Inserting %" PRIs " nodes...", node_count);
+	TPRINTF("Inserting %zu nodes...", node_count);
 	
 	for (i = 0; i < node_count; i++) {
Index: kernel/test/fpu/fpu1_ia64.c
===================================================================
--- kernel/test/fpu/fpu1_ia64.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/fpu/fpu1_ia64.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -161,5 +161,6 @@
 	
 	while (atomic_get(&threads_ok) != total) {
-		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
+		TPRINTF("Threads left: %" PRIua "\n",
+		    total - atomic_get(&threads_ok));
 		thread_sleep(1);
 	}
Index: kernel/test/fpu/fpu1_x86.c
===================================================================
--- kernel/test/fpu/fpu1_x86.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/fpu/fpu1_x86.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -82,5 +82,6 @@
 		
 		if ((int) (100000000 * e) != E_10e8) {
-			TPRINTF("tid%" PRIu64 ": e*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8);
+			TPRINTF("tid%" PRIu64 ": e*10e8=%" PRIun " should be %" PRIun "\n",
+			    THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8);
 			atomic_inc(&threads_fault);
 			break;
@@ -115,5 +116,6 @@
 		
 		if ((int) (100000000 * pi) != PI_10e8) {
-			TPRINTF("tid%" PRIu64 ": pi*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8);
+			TPRINTF("tid%" PRIu64 ": pi*10e8=%" PRIun " should be %" PRIun "\n",
+			    THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8);
 			atomic_inc(&threads_fault);
 			break;
@@ -158,5 +160,5 @@
 	
 	while (atomic_get(&threads_ok) != total) {
-		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
+		TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_ok));
 		thread_sleep(1);
 	}
Index: kernel/test/fpu/sse1.c
===================================================================
--- kernel/test/fpu/sse1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/fpu/sse1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -142,5 +142,5 @@
 	
 	while (atomic_get(&threads_ok) != total) {
-		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
+		TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_ok));
 		thread_sleep(1);
 	}
Index: kernel/test/mm/falloc1.c
===================================================================
--- kernel/test/mm/falloc1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/mm/falloc1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -64,5 +64,6 @@
 				
 				if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) {
-					TPRINTF("Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);
+					TPRINTF("Block at address %p (size %dK) is not aligned\n",
+					    (void *) frames[allocated], (FRAME_SIZE << order) >> 10);
 					return "Test failed";
 				}
Index: kernel/test/mm/falloc2.c
===================================================================
--- kernel/test/mm/falloc2.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/mm/falloc2.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -85,5 +85,6 @@
 				for (k = 0; k <= (((size_t) FRAME_SIZE << order) - 1); k++) {
 					if (((uint8_t *) frames[i])[k] != val) {
-						TPRINTF("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %#" PRIs "\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k);
+						TPRINTF("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %zu\n",
+						    THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k);
 						atomic_inc(&thread_fail);
 						goto cleanup;
@@ -121,5 +122,5 @@
 	
 	while (atomic_get(&thread_count) > 0) {
-		TPRINTF("Threads left: %ld\n", atomic_get(&thread_count));
+		TPRINTF("Threads left: %" PRIua "\n", atomic_get(&thread_count));
 		thread_sleep(1);
 	}
Index: kernel/test/mm/mapping1.c
===================================================================
--- kernel/test/mm/mapping1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/mm/mapping1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -39,6 +39,6 @@
 #define PAGE1  (PAGE0 + PAGE_SIZE)
 
-#define VALUE0  0x01234567
-#define VALUE1  0x89abcdef
+#define VALUE0  UINT32_C(0x01234567)
+#define VALUE1  UINT32_C(0x89abcdef)
 
 const char *test_mapping1(void)
@@ -50,20 +50,26 @@
 	frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA);
 	
-	TPRINTF("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
+	TPRINTF("Writing %#" PRIx32 " to physical address %p.\n",
+	    (uint32_t) VALUE0, (void *) KA2PA(frame0));
 	*((uint32_t *) frame0) = VALUE0;
 	
-	TPRINTF("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1));
+	TPRINTF("Writing %#" PRIx32 " to physical address %p.\n",
+	    (uint32_t) VALUE1, (void *) KA2PA(frame1));
 	*((uint32_t *) frame1) = VALUE1;
 	
-	TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0));
+	TPRINTF("Mapping virtual address %p to physical address %p.\n",
+	    (void *) PAGE0, (void *) KA2PA(frame0));
 	page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE);
 	
-	TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1));
+	TPRINTF("Mapping virtual address %p to physical address %p.\n",
+	    (void *) PAGE1, (void *) KA2PA(frame1));
 	page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE);
 	
 	v0 = *((uint32_t *) PAGE0);
 	v1 = *((uint32_t *) PAGE1);
-	TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, v0);
-	TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, v1);
+	TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
+	    (void *) PAGE0, v0);
+	TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
+	    (void *) PAGE1, v1);
 	
 	if (v0 != VALUE0)
@@ -72,8 +78,10 @@
 		return "Value at v1 not equal to VALUE1";
 	
-	TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE0);
+	TPRINTF("Writing %#" PRIx32 " to virtual address %p.\n",
+	    (uint32_t) 0, (void *) PAGE0);
 	*((uint32_t *) PAGE0) = 0;
 	
-	TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE1);
+	TPRINTF("Writing %#" PRIx32 " to virtual address %p.\n",
+	    (uint32_t) 0, (void *) PAGE1);
 	*((uint32_t *) PAGE1) = 0;
 	
@@ -81,6 +89,8 @@
 	v1 = *((uint32_t *) PAGE1);
 	
-	TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0));	
-	TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1));
+	TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
+	    (void *) PAGE0, *((uint32_t *) PAGE0));
+	TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
+	    (void *) PAGE1, *((uint32_t *) PAGE1));
 	
 	if (v0 != 0)
Index: kernel/test/synch/semaphore1.c
===================================================================
--- kernel/test/synch/semaphore1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/synch/semaphore1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -88,5 +88,6 @@
 		producers = (4 - i) * PRODUCERS;
 		
-		TPRINTF("Creating %d consumers and %d producers...", consumers, producers);
+		TPRINTF("Creating %" PRIua " consumers and %" PRIua " producers...",
+		    consumers, producers);
 		
 		for (j = 0; j < (CONSUMERS + PRODUCERS) / 2; j++) {
@@ -113,5 +114,6 @@
 		
 		while ((items_consumed.count != consumers) || (items_produced.count != producers)) {
-			TPRINTF("%d consumers remaining, %d producers remaining\n", consumers - items_consumed.count, producers - items_produced.count);
+			TPRINTF("%" PRIua " consumers remaining, %" PRIua " producers remaining\n",
+			    consumers - items_consumed.count, producers - items_produced.count);
 			thread_sleep(1);
 		}
Index: kernel/test/thread/thread1.c
===================================================================
--- kernel/test/thread/thread1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ kernel/test/thread/thread1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -76,5 +76,5 @@
 	atomic_set(&finish, 0);
 	while (atomic_get(&threads_finished) < total) {
-		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_finished));
+		TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_finished));
 		thread_sleep(1);
 	}
Index: uspace/app/bdsh/cmds/modules/bdd/bdd.c
===================================================================
--- uspace/app/bdsh/cmds/modules/bdd/bdd.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/bdsh/cmds/modules/bdd/bdd.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -30,4 +30,5 @@
 #include <stdlib.h>
 #include <str.h>
+#include <sys/typefmt.h>
 #include "config.h"
 #include "util.h"
@@ -122,5 +123,5 @@
 		rc = block_read_direct(handle, ba, 1, blk);
 		if (rc != EOK) {
-			printf("%s: Error reading block %llu\n", cmdname, ba);
+			printf("%s: Error reading block %" PRIuOFF64 "\n", cmdname, ba);
 			free(blk);
 			block_fini(handle);
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -95,5 +95,5 @@
 
 	if (vb)
-		printf("%d bytes to copy\n", total);
+		printf("%" PRIu64 " bytes to copy\n", total);
 
 	lseek(fd1, 0, SEEK_SET);
@@ -130,5 +130,5 @@
 		 */
 		if (res != 0) {
-			printf("\n%d more bytes than actually exist were copied\n", res);
+			printf("\n%zd more bytes than actually exist were copied\n", res);
 			goto err;
 		}
@@ -187,5 +187,5 @@
 			return CMD_SUCCESS;
 		case 'v':
-			printf("%d\n", CP_VERSION);
+			printf("%s\n", CP_VERSION);
 			return CMD_SUCCESS;
 		case 'V':
@@ -223,5 +223,5 @@
 
 	if (verbose)
-		printf("%d bytes copied\n", ret);
+		printf("%" PRId64 " bytes copied\n", ret);
 
 	if (ret >= 0)
Index: uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -168,5 +168,5 @@
 		rc = write(fd, buffer, to_write);
 		if (rc <= 0) {
-			printf("%s: Error writing file (%d).\n", cmdname, rc);
+			printf("%s: Error writing file (%zd).\n", cmdname, rc);
 			close(fd);
 			return CMD_FAILURE;
@@ -177,5 +177,5 @@
 	rc = close(fd);
 	if (rc != 0) {
-		printf("%s: Error writing file (%d).\n", cmdname, rc);
+		printf("%s: Error writing file (%zd).\n", cmdname, rc);
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/cmds/modules/unmount/unmount.c
===================================================================
--- uspace/app/bdsh/cmds/modules/unmount/unmount.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/bdsh/cmds/modules/unmount/unmount.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -47,5 +47,5 @@
 	} else {
 		help_cmd_unmount(HELP_SHORT);
-		printf("Usage:  %s <mp>\n", cmdname);
+		printf("Usage: %s <mp>\n", cmdname);
 	}
 	return;
@@ -68,5 +68,5 @@
 	rc = unmount(argv[1]);
 	if (rc != EOK) {
-		printf("Unable to unmount %s (rc=%d)\n", argv[1]);
+		printf("Unable to unmount %s (rc=%d)\n", argv[1], rc);
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/exec.c
===================================================================
--- uspace/app/bdsh/exec.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/bdsh/exec.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -133,5 +133,6 @@
 	rc = task_wait(tid, &texit, &retval);
 	if (rc != EOK) {
-		printf("%s: Failed waiting for command (%s)\n", str_error(rc));
+		printf("%s: Failed waiting for command (%s)\n", progname,
+		    str_error(rc));
 	} else if (texit != TASK_EXIT_NORMAL) {
 		printf("%s: Command failed (unexpectedly terminated)\n", progname);
Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/edit/edit.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -781,5 +781,5 @@
 			c = str_decode(row_buf, &pos, size);
 			if (c != '\t') {
-				printf("%lc", c);
+				printf("%lc", (wint_t) c);
 				s_column += 1;
 			} else {
@@ -830,5 +830,7 @@
 	int n = printf(" %d, %d: File '%s'. Ctrl-Q Quit  Ctrl-S Save  "
 	    "Ctrl-E Save As", coord.row, coord.column, fname);
-	printf("%*s", scr_columns - 1 - n, "");
+	
+	int pos = scr_columns - 1 - n;
+	printf("%*s", pos, "");
 	fflush(stdout);
 	console_set_style(con, STYLE_NORMAL);
@@ -1153,5 +1155,7 @@
 	console_set_pos(con, 0, scr_rows - 1);
 	console_set_style(con, STYLE_INVERTED);
-	printf(" %*s ", -(scr_columns - 3), str);
+	
+	int pos = -(scr_columns - 3);
+	printf(" %*s ", pos, str);
 	fflush(stdout);
 	console_set_style(con, STYLE_NORMAL);
Index: uspace/app/netecho/netecho.c
===================================================================
--- uspace/app/netecho/netecho.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/netecho/netecho.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -220,5 +220,5 @@
 	// check the buffer size
 	if (size <= 0) {
-		fprintf(stderr, "Receive size too small (%d). Using 1024 bytes instead.\n", size);
+		fprintf(stderr, "Receive size too small (%zu). Using 1024 bytes instead.\n", size);
 		size = 1024;
 	}
@@ -262,5 +262,5 @@
 		// check the backlog
 		if (backlog <= 0) {
-			fprintf(stderr, "Accepted sockets queue size too small (%d). Using 3 instead.\n", size);
+			fprintf(stderr, "Accepted sockets queue size too small (%zu). Using 3 instead.\n", size);
 			backlog = 3;
 		}
@@ -325,5 +325,6 @@
 						break;
 					default:
-						fprintf(stderr, "Address family %d (0x%X) is not supported.\n", address->sa_family);
+						fprintf(stderr, "Address family %u (%#x) is not supported.\n",
+						    address->sa_family, address->sa_family);
 					}
 					// parse the source address
@@ -334,5 +335,6 @@
 						} else {
 							data[length] = '\0';
-							printf("Socket %d received %d bytes from %s:%d\n%s\n", socket_id, length, address_string, port, data);
+							printf("Socket %d received %zu bytes from %s:%d\n%s\n",
+							    socket_id, length, address_string, port, data);
 						}
 					}
Index: uspace/app/nettest1/nettest1.c
===================================================================
--- uspace/app/nettest1/nettest1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/nettest1/nettest1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -356,5 +356,5 @@
 	/* Check data buffer size */
 	if (size <= 0) {
-		fprintf(stderr, "Data buffer size too small (%d). Using 1024 "
+		fprintf(stderr, "Data buffer size too small (%zu). Using 1024 "
 		    "bytes instead.\n", size);
 		size = 1024;
@@ -410,5 +410,5 @@
 	}
 
-	printf("Tested in %d microseconds\n", tv_sub(&time_after,
+	printf("Tested in %ld microseconds\n", tv_sub(&time_after,
 	    &time_before));
 
Index: uspace/app/nettest2/nettest2.c
===================================================================
--- uspace/app/nettest2/nettest2.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/nettest2/nettest2.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -302,5 +302,5 @@
 	/* Check data buffer size. */
 	if (size <= 0) {
-		fprintf(stderr, "Data buffer size too small (%d). Using 1024 "
+		fprintf(stderr, "Data buffer size too small (%zu). Using 1024 "
 		    "bytes instead.\n", size);
 		size = 1024;
@@ -375,5 +375,5 @@
 		printf("\tOK\n");
 
-	printf("sendto + recvfrom tested in %d microseconds\n",
+	printf("sendto + recvfrom tested in %ld microseconds\n",
 	    tv_sub(&time_after, &time_before));
 
@@ -403,5 +403,5 @@
 		printf("\tOK\n");
 
-	printf("sendto, recvfrom tested in %d microseconds\n",
+	printf("sendto, recvfrom tested in %ld microseconds\n",
 	    tv_sub(&time_after, &time_before));
 
Index: uspace/app/ping/ping.c
===================================================================
--- uspace/app/ping/ping.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/ping/ping.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -337,5 +337,5 @@
 	}
 	
-	printf("PING %s (%s) %u(%u) bytes of data\n", config.dest_addr,
+	printf("PING %s (%s) %zu(%zu) bytes of data\n", config.dest_addr,
 	    config.dest_str, config.size, config.size);
 	
@@ -378,9 +378,9 @@
 		switch (result) {
 		case ICMP_ECHO:
-			printf("%u bytes from ? (?): icmp_seq=%u ttl=? time=%u.%04u\n",
+			printf("%zu bytes from ? (?): icmp_seq=%u ttl=? time=%ld.%04ld\n",
 				config.size, seq, elapsed / 1000, elapsed % 1000);
 			break;
 		case ETIMEOUT:
-			printf("%u bytes from ? (?): icmp_seq=%u Timed out\n",
+			printf("%zu bytes from ? (?): icmp_seq=%u Timed out\n",
 				config.size, seq);
 			break;
Index: uspace/app/stats/stats.c
===================================================================
--- uspace/app/stats/stats.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/stats/stats.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -56,10 +56,12 @@
 	
 	uint64_t sec = time.tv_sec;
-	printf("%02" PRIu64 ":%02" PRIu64 ":%02" PRIu64, (sec % DAY) / HOUR,
-	    (sec % HOUR) / MINUTE, sec % MINUTE);
+	printf("%02" PRIu64 ":%02" PRIu64 ":%02" PRIu64,
+	    (sec % DAY) / HOUR, (sec % HOUR) / MINUTE, sec % MINUTE);
 	
 	sysarg_t uptime = stats_get_uptime();
-	printf(", up %u days, %u hours, %u minutes, %u seconds", uptime / DAY,
-	    (uptime % DAY) / HOUR, (uptime % HOUR) / MINUTE, uptime % MINUTE);
+	printf(", up %" PRIun " days, %" PRIun " hours, "
+	    "%" PRIun " minutes, %" PRIun " seconds",
+	    uptime / DAY, (uptime % DAY) / HOUR,
+	    (uptime % HOUR) / MINUTE, uptime % MINUTE);
 	
 	size_t count;
Index: uspace/app/taskdump/taskdump.c
===================================================================
--- uspace/app/taskdump/taskdump.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/taskdump/taskdump.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -85,5 +85,5 @@
 	rc = connect_task(task_id);
 	if (rc < 0) {
-		printf("Failed connecting to task %" PRIdTASKID ".\n", task_id);
+		printf("Failed connecting to task %" PRIu64 ".\n", task_id);
 		return 1;
 	}
@@ -92,5 +92,5 @@
 	app_symtab = NULL;
 
-	printf("Dumping task '%s' (task ID %" PRIdTASKID ").\n", app_name, task_id);
+	printf("Dumping task '%s' (task ID %" PRIu64 ").\n", app_name, task_id);
 	autoload_syms();
 	putchar('\n');
@@ -126,5 +126,5 @@
 	if (rc < 0) {
 		printf("Error connecting\n");
-		printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc);
+		printf("ipc_connect_task(%" PRIu64 ") -> %d ", task_id, rc);
 		return rc;
 	}
@@ -168,5 +168,5 @@
 				core_file_name = *argv;
 			} else {
-				printf("Uknown option '%s'\n", arg[0]);
+				printf("Uknown option '%c'\n", arg[0]);
 				print_syntax();
 				return -1;
@@ -240,5 +240,5 @@
 	printf("Threads:\n");
 	for (i = 0; i < n_threads; i++) {
-		printf(" [%d] hash: %p\n", 1+i, thash_buf[i]);
+		printf(" [%zu] hash: %p\n", 1 + i, (void *) thash_buf[i]);
 
 		thread_dump(thash_buf[i]);
@@ -284,10 +284,10 @@
 	printf("Address space areas:\n");
 	for (i = 0; i < n_areas; i++) {
-		printf(" [%d] flags: %c%c%c%c base: %p size: %p\n", 1+i,
+		printf(" [%zu] flags: %c%c%c%c base: %p size: %zu\n", 1 + i,
 		    (ainfo_buf[i].flags & AS_AREA_READ) ? 'R' : '-',
 		    (ainfo_buf[i].flags & AS_AREA_WRITE) ? 'W' : '-',
 		    (ainfo_buf[i].flags & AS_AREA_EXEC) ? 'X' : '-',
 		    (ainfo_buf[i].flags & AS_AREA_CACHEABLE) ? 'C' : '-',
-		    ainfo_buf[i].start_addr, ainfo_buf[i].size);
+		    (void *) ainfo_buf[i].start_addr, ainfo_buf[i].size);
 	}
 
@@ -326,5 +326,6 @@
 
 	sym_pc = fmt_sym_address(pc);
-	printf("Thread %p crashed at %s. FP = %p\n", thash, sym_pc, fp);
+	printf("Thread %p crashed at %s. FP = %p\n", (void *) thash,
+	    sym_pc, (void *) fp);
 	free(sym_pc);
 
@@ -334,5 +335,5 @@
 	while (stacktrace_fp_valid(&st, fp)) {
 		sym_pc = fmt_sym_address(pc);
-		printf("  %p: %s\n", fp, sym_pc);
+		printf("  %p: %s\n", (void *) fp, sym_pc);
 		free(sym_pc);
 
@@ -457,7 +458,7 @@
 
 	if (rc == EOK) {
-		rc = asprintf(&str, "%p (%s+%p)", addr, name, offs);
+		rc = asprintf(&str, "%p (%s+%zu)", (void *) addr, name, offs);
 	} else {
-		rc = asprintf(&str, "%p", addr);
+		rc = asprintf(&str, "%p", (void *) addr);
 	}
 
Index: uspace/app/tasks/tasks.c
===================================================================
--- uspace/app/tasks/tasks.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/tasks/tasks.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -77,5 +77,5 @@
 		order_suffix(stats_tasks[i].kcycles, &kcycles, &ksuffix);
 		
-		printf("%8" PRIu64 "%8u %8" PRIu64"%c %12"
+		printf("%8" PRIu64 "%8zu %8" PRIu64 "%c %12"
 		    PRIu64 "%c %12" PRIu64 "%c %s\n", stats_tasks[i].task_id,
 		    stats_tasks[i].threads, virtmem, vmsuffix, ucycles, usuffix,
@@ -160,5 +160,5 @@
 	}
 	
-	printf("%s: %u CPU(s) detected\n", NAME, count);
+	printf("%s: %zu CPU(s) detected\n", NAME, count);
 	
 	size_t i;
Index: uspace/app/test_serial/test_serial.c
===================================================================
--- uspace/app/test_serial/test_serial.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/test_serial/test_serial.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -35,4 +35,5 @@
  */
 
+#include <inttypes.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -79,6 +80,6 @@
 	}
 	
-	printf(NAME ": trying to read %d characters from device with handle "
-	    "%d.\n", cnt, handle);
+	printf(NAME ": trying to read %ld characters from device with handle "
+	    "%" PRIun ".\n", cnt, handle);
 	
 	int phone = devman_device_connect(handle, IPC_FLAG_BLOCKING);
Index: uspace/app/tester/ipc/ping_pong.c
===================================================================
--- uspace/app/tester/ipc/ping_pong.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/tester/ipc/ping_pong.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -72,5 +72,5 @@
 	}
 	
-	TPRINTF("OK\nCompleted %llu round trips in %u seconds, %llu rt/s.\n",
+	TPRINTF("OK\nCompleted %" PRIu64 " round trips in %u seconds, %" PRIu64 " rt/s.\n",
 	    count, DURATION_SECS, count / DURATION_SECS);
 	
Index: uspace/app/tester/ipc/register.c
===================================================================
--- uspace/app/tester/ipc/register.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/tester/ipc/register.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -27,4 +27,5 @@
  */
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -41,5 +42,5 @@
 	unsigned int i;
 	
-	TPRINTF("Connected phone %#x accepting\n", icall->in_phone_hash);
+	TPRINTF("Connected phone %" PRIun " accepting\n", icall->in_phone_hash);
 	ipc_answer_0(iid, EOK);
 	for (i = 0; i < MAX_CONNECTIONS; i++) {
@@ -57,14 +58,14 @@
 		switch (IPC_GET_METHOD(call)) {
 		case IPC_M_PHONE_HUNGUP:
-			TPRINTF("Phone %#x hung up\n", icall->in_phone_hash);
+			TPRINTF("Phone %" PRIun " hung up\n", icall->in_phone_hash);
 			retval = 0;
 			break;
 		case IPC_TEST_METHOD:
-			TPRINTF("Received well known message from %#x: %#x\n",
+			TPRINTF("Received well known message from %" PRIun ": %" PRIun "\n",
 			    icall->in_phone_hash, callid);
 			ipc_answer_0(callid, EOK);
 			break;
 		default:
-			TPRINTF("Received unknown message from %#x: %#x\n",
+			TPRINTF("Received unknown message from %" PRIun ": %" PRIun "\n",
 			    icall->in_phone_hash, callid);
 			ipc_answer_0(callid, ENOENT);
Index: uspace/app/tester/stdio/stdio1.c
===================================================================
--- uspace/app/tester/stdio/stdio1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/tester/stdio/stdio1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -60,5 +60,5 @@
 	
 	buf[cnt] = '\0';
-	TPRINTF("Read %u bytes, string \"%s\"\n", cnt, buf);
+	TPRINTF("Read %zu bytes, string \"%s\"\n", cnt, buf);
 	
 	TPRINTF("Seek to beginning...");
Index: uspace/app/tester/thread/thread1.c
===================================================================
--- uspace/app/tester/thread/thread1.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/tester/thread/thread1.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -35,4 +35,5 @@
 #include <stdio.h>
 #include <unistd.h>
+#include <inttypes.h>
 #include "../tester.h"
 
@@ -74,5 +75,6 @@
 	atomic_set(&finish, 0);
 	while (atomic_get(&threads_finished) < total) {
-		TPRINTF("Threads left: %u\n", total - atomic_get(&threads_finished));
+		TPRINTF("Threads left: %" PRIua "\n",
+		    total - atomic_get(&threads_finished));
 		sleep(1);
 	}
Index: uspace/app/trace/ipcp.c
===================================================================
--- uspace/app/trace/ipcp.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/trace/ipcp.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -137,9 +137,9 @@
 
 	if (oper != NULL) {
-		printf("%s (%ld)", oper->name, method);
+		printf("%s (%" PRIun ")", oper->name, method);
 		return;
 	}
 
-	printf("%ld", method);
+	printf("%" PRIun, method);
 }
 
@@ -201,10 +201,11 @@
 
 	if ((display_mask & DM_IPC) != 0) {
-		printf("Call ID: %p, phone: %d, proto: %s, method: ", hash,
-			phone, (proto ? proto->name : "n/a"));
+		printf("Call ID: %p, phone: %d, proto: %s, method: ",
+		    (void *) hash, phone,
+		    (proto ? proto->name : "n/a"));
 		ipc_m_print(proto, IPC_GET_METHOD(*call));
-		printf(" args: (%" PRIuIPCARG ", %" PRIuIPCARG ", %" PRIuIPCARG
-		    ", %" PRIuIPCARG ", %" PRIuIPCARG ")\n", args[1], args[2],
-		    args[3], args[4], args[5]);
+		printf(" args: (%" PRIun ", %" PRIun ", %" PRIun ", "
+		    "%" PRIun ", %" PRIun ")\n",
+		    args[1], args[2], args[3], args[4], args[5]);
 	}
 
@@ -281,8 +282,7 @@
 
 	if ((display_mask & DM_IPC) != 0) {
-		printf("Response to %p: retval=%ld, args = (%" PRIuIPCARG
-		    ", %" PRIuIPCARG ", %" PRIuIPCARG ", %" PRIuIPCARG
-		    ", %" PRIuIPCARG ")\n",
-		    hash, retval, IPC_GET_ARG1(*answer),
+		printf("Response to %p: retval=%" PRIdn ", args = (%" PRIun ", "
+		    "%" PRIun ", %" PRIun ", %" PRIun ", %" PRIun ")\n",
+		    (void *) hash, retval, IPC_GET_ARG1(*answer),
 		    IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
 		    IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
@@ -340,5 +340,5 @@
 		/* Not a response */
 		if ((display_mask & DM_IPC) != 0) {
-			printf("Not a response (hash %p)\n", hash);
+			printf("Not a response (hash %p)\n", (void *) hash);
 		}
 		return;
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/app/trace/trace.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -161,5 +161,5 @@
 	if (rc < 0) {
 		printf("Error connecting\n");
-		printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc);
+		printf("ipc_connect_task(%" PRIu64 ") -> %d ", task_id, rc);
 		return rc;
 	}
@@ -200,7 +200,7 @@
 	printf("Threads:");
 	for (i = 0; i < n_threads; i++) {
-		printf(" [%d] (hash %p)", 1+i, thread_hash_buf[i]);
-	}
-	printf("\ntotal of %u threads\n", tb_needed / sizeof(uintptr_t));
+		printf(" [%d] (hash %p)", 1 + i, (void *) thread_hash_buf[i]);
+	}
+	printf("\ntotal of %zu threads\n", tb_needed / sizeof(uintptr_t));
 
 	return 0;
@@ -224,5 +224,5 @@
 	case V_HASH:
 	case V_PTR:
-		printf("%p", val);
+		printf("%p", (void *) val);
 		break;
 
@@ -248,5 +248,5 @@
 	case V_CHAR:
 		if (sval >= 0x20 && sval < 0x7f) {
-			printf("'%c'", sval);
+			printf("'%c'", (char) sval);
 		} else {
 			switch (sval) {
@@ -257,5 +257,5 @@
 			case '\t': printf("'\\t'"); break;
 			case '\\': printf("'\\\\'"); break;
-			default: printf("'\\x%02lX'", val); break;
+			default: printf("'\\x%02" PRIxn "'", val); break;
 			}
 		}
@@ -277,7 +277,7 @@
 
 	putchar('(');
-	if (n > 0) printf("%" PRIdSYSARG, sc_args[0]);
+	if (n > 0) printf("%" PRIun, sc_args[0]);
 	for (i = 1; i < n; i++) {
-		printf(", %" PRIdSYSARG, sc_args[i]);
+		printf(", %" PRIun, sc_args[i]);
 	}
 	putchar(')');
@@ -489,5 +489,5 @@
 {
 	async_serialize_start();
-	printf("New thread, hash 0x%lx\n", hash);
+	printf("New thread, hash %p\n", (void *) hash);
 	async_serialize_end();
 
@@ -510,5 +510,6 @@
 	}
 
-	printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash);
+	printf("Start tracing thread [%u] (hash %p).\n",
+	    thread_id, (void *) thread_hash);
 
 	while (!abort_trace) {
@@ -516,5 +517,5 @@
 		fibril_mutex_lock(&state_lock);
 		if (paused) {
-			printf("Thread [%d] paused. Press R to resume.\n",
+			printf("Thread [%u] paused. Press R to resume.\n",
 			    thread_id);
 
@@ -522,5 +523,5 @@
 				fibril_condvar_wait(&state_cv, &state_lock);
 
-			printf("Thread [%d] resumed.\n", thread_id);
+			printf("Thread [%u] resumed.\n", thread_id);
 		}
 		fibril_mutex_unlock(&state_lock);
@@ -554,5 +555,5 @@
 				break;
 			case UDEBUG_EVENT_THREAD_E:
-				printf("Thread %p exited.\n", val0);
+				printf("Thread %" PRIun " exited.\n", val0);
 				fibril_mutex_lock(&state_lock);
 				abort_trace = true;
@@ -927,5 +928,5 @@
 				}
 			} else {
-				printf("Uknown option '%s'\n", arg[0]);
+				printf("Uknown option '%c'\n", arg[0]);
 				print_syntax();
 				return -1;
@@ -984,9 +985,9 @@
 	rc = connect_task(task_id);
 	if (rc < 0) {
-		printf("Failed connecting to task %" PRIdTASKID ".\n", task_id);
+		printf("Failed connecting to task %" PRIu64 ".\n", task_id);
 		return 1;
 	}
 
-	printf("Connected to task %" PRIdTASKID ".\n", task_id);
+	printf("Connected to task %" PRIu64 ".\n", task_id);
 
 	if (task_ldr != NULL)
Index: uspace/drv/isa/isa.c
===================================================================
--- uspace/drv/isa/isa.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/drv/isa/isa.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -493,6 +493,5 @@
 	/* Add child devices. */
 	add_legacy_children(dev);
-	printf(NAME ": finished the enumeration of legacy devices\n",
-	    dev->handle);
+	printf(NAME ": finished the enumeration of legacy devices\n");
 
 	return EOK;
Index: uspace/drv/ns8250/ns8250.c
===================================================================
--- uspace/drv/ns8250/ns8250.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/drv/ns8250/ns8250.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -276,5 +276,5 @@
 	if (pio_enable((void *) data->io_addr, REG_COUNT,
 	    (void **) &data->port)) {
-		printf(NAME ": error - cannot gain the port %lx for device "
+		printf(NAME ": error - cannot gain the port %#" PRIx32 " for device "
 		    "%s.\n", data->io_addr, dev->name);
 		return false;
Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/drv/pciintel/pci.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -323,5 +323,5 @@
 	if (range_addr != 0) {
 		printf(NAME ": device %s : ", dev->name);
-		printf("address = %x", range_addr);
+		printf("address = %" PRIx64, range_addr);
 		printf(", size = %x\n", range_size);
 	}
@@ -479,5 +479,5 @@
 	}	
 	
-	printf(NAME ": conf_addr = %x.\n",
+	printf(NAME ": conf_addr = %" PRIx64 ".\n",
 	    hw_resources.resources[0].res.io_range.address);
 	
Index: uspace/drv/root/root.c
===================================================================
--- uspace/drv/root/root.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/drv/root/root.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -45,4 +45,5 @@
 #include <ctype.h>
 #include <macros.h>
+#include <inttypes.h>
 
 #include <driver.h>
@@ -126,5 +127,6 @@
 static int root_add_device(device_t *dev)
 {
-	printf(NAME ": root_add_device, device handle = %d\n", dev->handle);
+	printf(NAME ": root_add_device, device handle=%" PRIun "\n",
+	    dev->handle);
 	
 	/* Register root device's children. */
Index: uspace/lib/block/libblock.c
===================================================================
--- uspace/lib/block/libblock.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/lib/block/libblock.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -816,6 +816,6 @@
 	    UPPER32(ba), cnt);
 	if (rc != EOK) {
-		printf("Error %d reading %d blocks starting at block %" PRIuOFF64
-		    " from device handle %d\n", rc, cnt, ba,
+		printf("Error %d reading %zu blocks starting at block %" PRIuOFF64
+		    " from device handle %" PRIun "\n", rc, cnt, ba,
 		    devcon->devmap_handle);
 #ifndef NDEBUG
@@ -843,6 +843,6 @@
 	    UPPER32(ba), cnt);
 	if (rc != EOK) {
-		printf("Error %d writing %d blocks starting at block %" PRIuOFF64
-		    " to device handle %d\n", rc, cnt, ba, devcon->devmap_handle);
+		printf("Error %d writing %zu blocks starting at block %" PRIuOFF64
+		    " to device handle %" PRIun "\n", rc, cnt, ba, devcon->devmap_handle);
 #ifndef NDEBUG
 		stacktrace_print();
Index: uspace/lib/c/generic/stacktrace.c
===================================================================
--- uspace/lib/c/generic/stacktrace.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/lib/c/generic/stacktrace.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -50,5 +50,5 @@
 
 	while (stacktrace_fp_valid(&st, fp)) {
-		printf("%p: %p()\n", fp, pc);
+		printf("%p: %p()\n", (void *) fp, (void *) pc);
 		(void) stacktrace_ra_get(&st, fp, &pc);
 		(void) stacktrace_fp_prev(&st, fp, &nfp);
Index: uspace/lib/drv/generic/driver.c
===================================================================
--- uspace/lib/drv/generic/driver.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/lib/drv/generic/driver.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -48,4 +48,5 @@
 #include <ctype.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include <ipc/driver.h>
@@ -173,8 +174,8 @@
 	res = driver->driver_ops->add_device(dev);
 	if (0 == res) {
-		printf("%s: new device with handle = %x was added.\n",
+		printf("%s: new device with handle=%" PRIun " was added.\n",
 		    driver->name, dev_handle);
 	} else {
-		printf("%s: failed to add a new device with handle = %d.\n",
+		printf("%s: failed to add a new device with handle = %" PRIun ".\n",
 		    driver->name, dev_handle);
 		remove_from_devices_list(dev);
@@ -225,5 +226,5 @@
 	if (dev == NULL) {
 		printf("%s: driver_connection_gen error - no device with handle"
-		    " %x was found.\n", driver->name, handle);
+		    " %" PRIun " was found.\n", driver->name, handle);
 		ipc_answer_0(iid, ENOENT);
 		return;
@@ -289,5 +290,5 @@
 				printf("%s: driver_connection_gen error - ",
 				    driver->name);
-				printf("device with handle %d has no interface "
+				printf("device with handle %" PRIun " has no interface "
 				    "with id %d.\n", handle, iface_idx);
 				ipc_answer_0(callid, ENOTSUP);
Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -113,5 +113,6 @@
 	printf(NAME ": ATA disk driver\n");
 
-	printf("I/O address %p/%p\n", ctl_physical, cmd_physical);
+	printf("I/O address %p/%p\n", (void *) ctl_physical,
+	    (void *) cmd_physical);
 
 	if (ata_bd_init() != EOK)
@@ -181,5 +182,5 @@
 	}
 
-	printf(" %" PRIu64 " blocks", d->blocks, d->blocks / (2 * 1024));
+	printf(" %" PRIu64 " blocks", d->blocks);
 
 	mbytes = d->blocks / (2 * 1024);
Index: uspace/srv/bd/part/guid_part/guid_part.c
===================================================================
--- uspace/srv/bd/part/guid_part/guid_part.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/bd/part/guid_part/guid_part.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -155,5 +155,5 @@
 
 	if (block_size < 512 || (block_size % 512) != 0) {
-		printf(NAME ": invalid block size %d.\n");
+		printf(NAME ": invalid block size %zu.\n", block_size);
 		return ENOTSUP;
 	}
Index: uspace/srv/bd/part/mbr_part/mbr_part.c
===================================================================
--- uspace/srv/bd/part/mbr_part/mbr_part.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/bd/part/mbr_part/mbr_part.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -206,5 +206,5 @@
 
 	if (block_size < 512 || (block_size % 512) != 0) {
-		printf(NAME ": invalid block size %d.\n");
+		printf(NAME ": invalid block size %zu.\n", block_size);
 		return ENOTSUP;
 	}
Index: uspace/srv/bd/rd/rd.c
===================================================================
--- uspace/srv/bd/rd/rd.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/bd/rd/rd.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -230,5 +230,6 @@
 	}
 	
-	printf("%s: Found RAM disk at %p, %d bytes\n", NAME, rd_ph_addr, rd_size);
+	printf("%s: Found RAM disk at %p, %zu bytes\n", NAME,
+	    (void *) rd_ph_addr, rd_size);
 	
 	int rc = devmap_driver_register(NAME, rd_connection);
Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/devman/devman.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -1014,5 +1014,5 @@
 	
 	size_t idx = get_new_class_dev_idx(cl);
-	asprintf(&dev_name, "%s%d", base_name, idx);
+	asprintf(&dev_name, "%s%zu", base_name, idx);
 	
 	return dev_name;
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/devman/main.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -36,4 +36,5 @@
  */
 
+#include <inttypes.h>
 #include <assert.h>
 #include <ipc/services.h>
@@ -417,6 +418,6 @@
 	node_t *dev = find_dev_node(&device_tree, handle);
 	if (dev == NULL) {
-		printf(NAME ": devman_forward error - no device with handle %x "
-		    "was found.\n", handle);
+		printf(NAME ": devman_forward error - no device with handle %" PRIun
+		    " was found.\n", handle);
 		ipc_answer_0(iid, ENOENT);
 		return;
@@ -434,6 +435,6 @@
 	
 	if (driver == NULL) {
-		printf(NAME ": devman_forward error - the device is not in "
-		    "usable state.\n", handle);
+		printf(NAME ": devman_forward error - the device is not in %" PRIun
+		    " usable state.\n", handle);
 		ipc_answer_0(iid, ENOENT);
 		return;
@@ -449,5 +450,5 @@
 		printf(NAME ": devman_forward: cound not forward to driver %s ",
 		    driver->name);
-		printf("the driver's phone is %x).\n", driver->phone);
+		printf("the driver's phone is %" PRIun ").\n", driver->phone);
 		ipc_answer_0(iid, EINVAL);
 		return;
Index: uspace/srv/devmap/devmap.c
===================================================================
--- uspace/srv/devmap/devmap.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/devmap/devmap.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -555,5 +555,5 @@
 	if (devmap_device_find_name(namespace->name, device->name) != NULL) {
 		printf("%s: Device '%s/%s' already registered\n", NAME,
-		    device->namespace, device->name);
+		    device->namespace->name, device->name);
 		devmap_namespace_destroy(namespace);
 		fibril_mutex_unlock(&devices_list_mutex);
Index: uspace/srv/hid/console/console.c
===================================================================
--- uspace/srv/hid/console/console.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hid/console/console.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -804,5 +804,5 @@
 			if (screenbuffer_init(&consoles[i].scr,
 			    fb_info.cols, fb_info.rows) == NULL) {
-				printf(NAME ": Unable to allocate screen buffer %u\n", i);
+				printf(NAME ": Unable to allocate screen buffer %zu\n", i);
 				return false;
 			}
@@ -813,5 +813,5 @@
 			
 			char vc[DEVMAP_NAME_MAXLEN + 1];
-			snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%u", NAMESPACE, i);
+			snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%zu", NAMESPACE, i);
 			
 			if (devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {
Index: uspace/srv/hid/console/gcons.c
===================================================================
--- uspace/srv/hid/console/gcons.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hid/console/gcons.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -157,5 +157,5 @@
 		
 		char data[5];
-		snprintf(data, 5, "%u", index + 1);
+		snprintf(data, 5, "%zu", index + 1);
 		
 		size_t i;
Index: uspace/srv/hid/fb/serial_console.c
===================================================================
--- uspace/srv/hid/fb/serial_console.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hid/fb/serial_console.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -47,4 +47,5 @@
 #include <io/style.h>
 #include <str.h>
+#include <inttypes.h>
 #include <io/screenbuffer.h>
 
@@ -135,5 +136,6 @@
 	
 	char control[MAX_CONTROL];
-	snprintf(control, MAX_CONTROL, "\033[%u;%uf", row + 1, col + 1);
+	snprintf(control, MAX_CONTROL, "\033[%" PRIun ";%" PRIun "f",
+	    row + 1, col + 1);
 	serial_puts(control);
 }
@@ -253,5 +255,5 @@
 {
 	char control[MAX_CONTROL];
-	snprintf(control, MAX_CONTROL, "\033[0;%ur", last_row);
+	snprintf(control, MAX_CONTROL, "\033[0;%" PRIun "r", last_row);
 	serial_puts(control);
 }
Index: uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
===================================================================
--- uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -50,4 +50,5 @@
 #include <sysinfo.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "s3c24xx_ts.h"
@@ -136,6 +137,6 @@
 	ts->last_y = 0;
 
-	printf(NAME ": device at physical address 0x%x, inr %d.\n",
-	    ts->paddr, inr);
+	printf(NAME ": device at physical address %p, inr %" PRIun ".\n",
+	    (void *) ts->paddr, inr);
 
 	async_set_interrupt_received(s3c24xx_ts_irq_handler);
Index: uspace/srv/hw/char/i8042/i8042.c
===================================================================
--- uspace/srv/hw/char/i8042/i8042.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hw/char/i8042/i8042.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -46,4 +46,5 @@
 #include <stdio.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "i8042.h"
@@ -201,5 +202,6 @@
 	ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd);
 	ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd);
-	printf("%s: registered for interrupts %d and %d\n", NAME, inr_a, inr_b);
+	printf("%s: registered for interrupts %" PRIun " and %" PRIun "\n",
+	    NAME, inr_a, inr_b);
 
 	wait_ready();
@@ -262,5 +264,5 @@
 			break;
 		case IPC_FIRST_USER_METHOD:
-			printf(NAME ": write %d to devid %d\n",
+			printf(NAME ": write %" PRIun " to devid %d\n",
 			    IPC_GET_ARG1(call), dev_id);
 			i8042_port_write(dev_id, IPC_GET_ARG1(call));
Index: uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
===================================================================
--- uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -48,4 +48,5 @@
 #include <sysinfo.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "s3c24xx_uart.h"
@@ -95,5 +96,6 @@
 	if (rc != EOK) {
 		devmap_hangup_phone(DEVMAP_DRIVER);
-		printf(NAME ": Unable to register device %s.\n");
+		printf(NAME ": Unable to register device %s.\n",
+		    NAMESPACE "/" NAME);
 		return -1;
 	}
@@ -134,5 +136,5 @@
 			break;
 		case CHAR_WRITE_BYTE:
-			printf(NAME ": write %d to device\n",
+			printf(NAME ": write %" PRIun " to device\n",
 			    IPC_GET_ARG1(call));
 			s3c24xx_uart_sendb(uart, (uint8_t) IPC_GET_ARG1(call));
@@ -185,6 +187,6 @@
 	uart->client_phone = -1;
 
-	printf(NAME ": device at physical address 0x%x, inr %d.\n",
-	    uart->paddr, inr);
+	printf(NAME ": device at physical address %p, inr %" PRIun ".\n",
+	    (void *) uart->paddr, inr);
 
 	async_set_interrupt_received(s3c24xx_uart_irq_handler);
Index: uspace/srv/hw/cir/fhc/fhc.c
===================================================================
--- uspace/srv/hw/cir/fhc/fhc.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hw/cir/fhc/fhc.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -129,5 +129,5 @@
 	}
 	
-	printf(NAME ": FHC UART registers at %p, %d bytes\n", fhc_uart_phys,
+	printf(NAME ": FHC UART registers at %p, %zu bytes\n", fhc_uart_phys,
 	    fhc_uart_size);
 	
Index: uspace/srv/hw/netif/dp8390/dp8390.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hw/netif/dp8390/dp8390.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -1516,6 +1516,6 @@
 	if (!wdeth_probe(dep) && !ne_probe(dep) && !el2_probe(dep))
 	{
-		printf("%s: No ethernet card found at 0x%x\n", 
-			dep->de_name, dep->de_base_port);
+		printf("%s: No ethernet card found at %#lx\n",
+		    dep->de_name, dep->de_base_port);
 		dep->de_mode= DEM_DISABLED;
 		return;
Index: uspace/srv/hw/netif/dp8390/ne2000.c
===================================================================
--- uspace/srv/hw/netif/dp8390/ne2000.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/hw/netif/dp8390/ne2000.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -267,14 +267,14 @@
 	if (!debug)
 	{
-		printf("%s: NE%d000 at %X:%d\n",
-			dep->de_name, dep->de_16bit ? 2 : 1,
-			dep->de_base_port, dep->de_irq);
+		printf("%s: NE%d000 at %#lx:%d\n",
+		    dep->de_name, dep->de_16bit ? 2 : 1,
+		    dep->de_base_port, dep->de_irq);
 	}
 	else
 	{
 		printf("%s: Novell NE%d000 ethernet card at I/O address "
-			"0x%X, memory size 0x%X, irq %d\n",
-			dep->de_name, dep->de_16bit ? 2 : 1,
-			dep->de_base_port, dep->de_ramsize, dep->de_irq);
+		    "%#lx, memory size %#lx, irq %d\n",
+		    dep->de_name, dep->de_16bit ? 2 : 1,
+		    dep->de_base_port, dep->de_ramsize, dep->de_irq);
 	}
 }
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/net/il/arp/arp.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -391,5 +391,5 @@
 	device->packet_dimension.content = mtu;
 	fibril_rwlock_write_unlock(&arp_globals.lock);
-	printf("arp - device %d changed mtu to %d\n\n", device_id, mtu);
+	printf("arp - device %d changed mtu to %zu\n\n", device_id, mtu);
 	return EOK;
 }
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/net/il/ip/ip.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -461,5 +461,5 @@
 	
 	if (ip_netif->packet_dimension.content < IP_MIN_CONTENT) {
-		printf("Maximum transmission unit %d bytes is too small, at "
+		printf("Maximum transmission unit %zu bytes is too small, at "
 		    "least %d bytes are needed\n",
 		    ip_netif->packet_dimension.content, IP_MIN_CONTENT);
@@ -502,5 +502,5 @@
 	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
 
-	printf("%s: Device %d changed MTU to %d\n", NAME, device_id, mtu);
+	printf("%s: Device %d changed MTU to %zu\n", NAME, device_id, mtu);
 
 	return EOK;
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/net/nil/eth/eth.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -315,5 +315,5 @@
 			device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
 		
-		printf("Device %d already exists:\tMTU\t= %d\n",
+		printf("Device %d already exists:\tMTU\t= %zu\n",
 		    device->device_id, device->mtu);
 		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
@@ -407,5 +407,5 @@
 	}
 	
-	printf("%s: Device registered (id: %d, service: %d: mtu: %d, "
+	printf("%s: Device registered (id: %d, service: %d: mtu: %zu, "
 	    "mac: %x:%x:%x:%x:%x:%x, flags: 0x%x)\n",
 	    NAME, device->device_id, device->service, device->mtu,
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -175,5 +175,5 @@
 			device->mtu = NET_DEFAULT_MTU;
 		
-		printf("Device %d already exists:\tMTU\t= %d\n",
+		printf("Device %d already exists:\tMTU\t= %zu\n",
 		    device->device_id, device->mtu);
 		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
@@ -232,5 +232,5 @@
 	}
 	
-	printf("%s: Device registered (id: %d, service: %d, mtu: %d)\n",
+	printf("%s: Device registered (id: %d, service: %d, mtu: %zu)\n",
 	    NAME, device->device_id, device->service, device->mtu);
 	fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
Index: uspace/srv/taskmon/taskmon.c
===================================================================
--- uspace/srv/taskmon/taskmon.c	(revision 202f57b62cc63567ddf782a70c1504e930277141)
+++ uspace/srv/taskmon/taskmon.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
@@ -60,10 +60,11 @@
 	thread = IPC_GET_ARG3(*call);
 
-	if (asprintf(&s_taskid, "%" PRIuTASKID, taskid) < 0) {
+	if (asprintf(&s_taskid, "%" PRIu64, taskid) < 0) {
 		printf("Memory allocation failed.\n");
 		return;
 	}
 
-	printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread);
+	printf(NAME ": Task %" PRIu64 " fault in thread %p.\n", taskid,
+	    (void *) thread);
 
 	fname = "/app/taskdump";
@@ -72,14 +73,14 @@
 	char *dump_fname;
 
-	if (asprintf(&dump_fname, "/data/core%" PRIuTASKID, taskid) < 0) {
+	if (asprintf(&dump_fname, "/data/core%" PRIu64, taskid) < 0) {
 		printf("Memory allocation failed.\n");
 		return;
 	}
 
-	printf(NAME ": Executing %s -c %s -t %s\n", dump_fname, s_taskid);
+	printf(NAME ": Executing %s -c %s -t %s\n", fname, dump_fname, s_taskid);
 	rc = task_spawnl(NULL, fname, fname, "-c", dump_fname, "-t", s_taskid,
 	    NULL);
 #else
-	printf(NAME ": Executing %s -t %s\n", s_taskid);
+	printf(NAME ": Executing %s -t %s\n", fname, s_taskid);
 	rc = task_spawnl(NULL, fname, fname, "-t", s_taskid, NULL);
 #endif
