Index: HelenOS.config
===================================================================
--- HelenOS.config	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ HelenOS.config	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -555,5 +555,5 @@
 
 % Sun serial console support
-! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic&CONFIG_NS16550=y] CONFIG_SUN_TTY (n/y)
+! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic&CONFIG_NS16550=y] CONFIG_SUN_TTY (y)
 
 % Macintosh ADB keyboard support
Index: contrib/qemu/build-from-scratch.sh
===================================================================
--- contrib/qemu/build-from-scratch.sh	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ contrib/qemu/build-from-scratch.sh	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -29,5 +29,5 @@
 #
 
-VERSION=3.1.0
+VERSION=4.0.0
 BASENAME=qemu-${VERSION}
 BASENAME_MASTER=qemu-master
Index: kernel/arch/sparc64/src/mm/sun4u/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -311,5 +311,6 @@
 		t.a = true;
 		t.d = true;
-		dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY,
+		dtlb_demap(TLB_DEMAP_PAGE,
+		    (as == AS_KERNEL) ? TLB_DEMAP_PRIMARY : TLB_DEMAP_SECONDARY,
 		    page_16k + index * MMU_PAGE_SIZE);
 		dtlb_pte_copy(&t, index, false);
Index: kernel/genarch/include/genarch/drivers/via-cuda/cuda.h
===================================================================
--- kernel/genarch/include/genarch/drivers/via-cuda/cuda.h	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ kernel/genarch/include/genarch/drivers/via-cuda/cuda.h	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -42,50 +42,50 @@
 
 typedef struct {
-	uint8_t b;
+	ioport8_t b;
 	uint8_t pad0[0x1ff];
 
-	uint8_t a;
+	ioport8_t a;
 	uint8_t pad1[0x1ff];
 
-	uint8_t dirb;
+	ioport8_t dirb;
 	uint8_t pad2[0x1ff];
 
-	uint8_t dira;
+	ioport8_t dira;
 	uint8_t pad3[0x1ff];
 
-	uint8_t t1cl;
+	ioport8_t t1cl;
 	uint8_t pad4[0x1ff];
 
-	uint8_t t1ch;
+	ioport8_t t1ch;
 	uint8_t pad5[0x1ff];
 
-	uint8_t t1ll;
+	ioport8_t t1ll;
 	uint8_t pad6[0x1ff];
 
-	uint8_t t1lh;
+	ioport8_t t1lh;
 	uint8_t pad7[0x1ff];
 
-	uint8_t t2cl;
+	ioport8_t t2cl;
 	uint8_t pad8[0x1ff];
 
-	uint8_t t2ch;
+	ioport8_t t2ch;
 	uint8_t pad9[0x1ff];
 
-	uint8_t sr;
+	ioport8_t sr;
 	uint8_t pad10[0x1ff];
 
-	uint8_t acr;
+	ioport8_t acr;
 	uint8_t pad11[0x1ff];
 
-	uint8_t pcr;
+	ioport8_t pcr;
 	uint8_t pad12[0x1ff];
 
-	uint8_t ifr;
+	ioport8_t ifr;
 	uint8_t pad13[0x1ff];
 
-	uint8_t ier;
+	ioport8_t ier;
 	uint8_t pad14[0x1ff];
 
-	uint8_t anh;
+	ioport8_t anh;
 	uint8_t pad15[0x1ff];
 } cuda_t;
Index: uspace/drv/bus/adb/cuda_adb/cuda_hw.h
===================================================================
--- uspace/drv/bus/adb/cuda_adb/cuda_hw.h	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ uspace/drv/bus/adb/cuda_adb/cuda_hw.h	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -37,53 +37,55 @@
 #define CUDA_HW_H_
 
+#include <ddi.h>
+
 #include <stdint.h>
 
 typedef struct cuda_regs {
-	uint8_t b;
+	ioport8_t b;
 	uint8_t pad0[0x1ff];
 
-	uint8_t a;
+	ioport8_t a;
 	uint8_t pad1[0x1ff];
 
-	uint8_t dirb;
+	ioport8_t dirb;
 	uint8_t pad2[0x1ff];
 
-	uint8_t dira;
+	ioport8_t dira;
 	uint8_t pad3[0x1ff];
 
-	uint8_t t1cl;
+	ioport8_t t1cl;
 	uint8_t pad4[0x1ff];
 
-	uint8_t t1ch;
+	ioport8_t t1ch;
 	uint8_t pad5[0x1ff];
 
-	uint8_t t1ll;
+	ioport8_t t1ll;
 	uint8_t pad6[0x1ff];
 
-	uint8_t t1lh;
+	ioport8_t t1lh;
 	uint8_t pad7[0x1ff];
 
-	uint8_t t2cl;
+	ioport8_t t2cl;
 	uint8_t pad8[0x1ff];
 
-	uint8_t t2ch;
+	ioport8_t t2ch;
 	uint8_t pad9[0x1ff];
 
-	uint8_t sr;
+	ioport8_t sr;
 	uint8_t pad10[0x1ff];
 
-	uint8_t acr;
+	ioport8_t acr;
 	uint8_t pad11[0x1ff];
 
-	uint8_t pcr;
+	ioport8_t pcr;
 	uint8_t pad12[0x1ff];
 
-	uint8_t ifr;
+	ioport8_t ifr;
 	uint8_t pad13[0x1ff];
 
-	uint8_t ier;
+	ioport8_t ier;
 	uint8_t pad14[0x1ff];
 
-	uint8_t anh;
+	ioport8_t anh;
 	uint8_t pad15[0x1ff];
 } cuda_regs_t;
Index: uspace/lib/c/arch/ppc32/src/rtld/reloc.c
===================================================================
--- uspace/lib/c/arch/ppc32/src/rtld/reloc.c	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ uspace/lib/c/arch/ppc32/src/rtld/reloc.c	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -240,14 +240,4 @@
 			}
 
-			sym_size = sym->st_size;
-			if (sym_size != sym_def->st_size) {
-#if 0
-				printf("Warning: Mismatched symbol sizes.\n");
-#endif
-				/* Take the lower value. */
-				if (sym_size > sym_def->st_size)
-					sym_size = sym_def->st_size;
-			}
-
 			DPRINTF("sym_addr = 0x%zx\n", sym_addr);
 			DPRINTF("r_offset=0x%zx\n", r_offset);
Index: uspace/lib/c/arch/sparc64/src/rtld/reloc.c
===================================================================
--- uspace/lib/c/arch/sparc64/src/rtld/reloc.c	(revision 6de65f37762c68a80126db1923a3341dc11c2450)
+++ uspace/lib/c/arch/sparc64/src/rtld/reloc.c	(revision 5773e827cf0567542d18c932dd0f0b24725b01ca)
@@ -206,12 +206,4 @@
 			}
 
-			sym_size = sym->st_size;
-			if (sym_size != sym_def->st_size) {
-				printf("Warning: Mismatched symbol sizes.\n");
-				/* Take the lower value. */
-				if (sym_size > sym_def->st_size)
-					sym_size = sym_def->st_size;
-			}
-
 			DPRINTF("sym_addr = 0x%zx\n", sym_addr);
 			DPRINTF("r_offset=0x%zx\n", r_offset);
