Index: HelenOS.config
===================================================================
--- HelenOS.config	(revision 13c94f72bf34f8a9e3b97905dfe64392001645d6)
+++ HelenOS.config	(revision d78314585b84d27c6872ccb1a4322113515b7907)
@@ -530,5 +530,5 @@
 
 % Serial line input module
-! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y)
+! [CONFIG_DSRLNIN=y|(PLATFORM=sparc32)|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y)
 
 % EGA support
Index: kernel/arch/sparc32/src/machine/leon3/leon3.c
===================================================================
--- kernel/arch/sparc32/src/machine/leon3/leon3.c	(revision 13c94f72bf34f8a9e3b97905dfe64392001645d6)
+++ kernel/arch/sparc32/src/machine/leon3/leon3.c	(revision d78314585b84d27c6872ccb1a4322113515b7907)
@@ -43,4 +43,5 @@
 #include <genarch/drivers/grlib_uart/grlib_uart.h>
 #include <genarch/drivers/grlib_irqmp/grlib_irqmp.h>
+#include <genarch/srln/srln.h>
 
 #include <func.h>
@@ -130,4 +131,7 @@
 static void leon3_output_init(void)
 {
+	printf("leon3_output_init\n");
+	printf("machine.bootinfo=%p, machine.bootinfo->uart_base=0x%08x\n", machine.bootinfo, machine.bootinfo->uart_base);
+
 	machine.scons_dev = grlib_uart_init(machine.bootinfo->uart_base, machine.bootinfo->uart_irq);
 
@@ -138,6 +142,19 @@
 static void leon3_input_init(void)
 {
+	grlib_uart_t *scons_inst;
+
 	if (machine.scons_dev) {
+		/* Create input device. */
+		scons_inst = (void *)machine.scons_dev->data;
 
+		srln_instance_t *srln_instance = srln_init();
+		if (srln_instance) {
+			indev_t *sink = stdin_wire();
+			indev_t *srln = srln_wire(srln_instance, sink);
+			grlib_uart_input_wire(scons_inst, srln);
+
+			/* Enable interrupts from UART */
+			grlib_irqmp_unmask(&machine.irqmp, machine.bootinfo->uart_irq);
+		}
 	}
 }
Index: kernel/arch/sparc32/src/start.S
===================================================================
--- kernel/arch/sparc32/src/start.S	(revision 13c94f72bf34f8a9e3b97905dfe64392001645d6)
+++ kernel/arch/sparc32/src/start.S	(revision d78314585b84d27c6872ccb1a4322113515b7907)
@@ -47,4 +47,5 @@
 
 	or	%g1, 0x20, %g1
+	or	%g1, 0xf00, %g1		! PIL
         wr      %g1, %psr
 
Index: kernel/genarch/Makefile.inc
===================================================================
--- kernel/genarch/Makefile.inc	(revision 13c94f72bf34f8a9e3b97905dfe64392001645d6)
+++ kernel/genarch/Makefile.inc	(revision d78314585b84d27c6872ccb1a4322113515b7907)
@@ -112,5 +112,10 @@
 ifeq ($(CONFIG_GRLIB_UART),y)
 	GENARCH_SOURCES += \
-		genarch/src/drivers/omap/uart.c
+		genarch/src/drivers/grlib_uart/grlib_uart.c
+endif
+
+ifeq ($(CONFIG_GRLIB_IRQMP),y)
+	GENARCH_SOURCES += \
+		genarch/src/drivers/grlib_irqmp/grlib_irqmp.c
 endif
 
Index: kernel/genarch/src/drivers/grlib_irqmp/grlib_irqmp.c
===================================================================
--- kernel/genarch/src/drivers/grlib_irqmp/grlib_irqmp.c	(revision 13c94f72bf34f8a9e3b97905dfe64392001645d6)
+++ kernel/genarch/src/drivers/grlib_irqmp/grlib_irqmp.c	(revision d78314585b84d27c6872ccb1a4322113515b7907)
@@ -45,6 +45,8 @@
 	    PAGE_NOT_CACHEABLE);
 
+	printf("irqmp regs: %p\n", irqc->regs);
+
 	/* Mask all interrupts */
-	pio_write_32((void *)&irqc->regs + GRLIB_IRQMP_MASK_OFFSET, 0);
+	pio_write_32((void *)irqc->regs + GRLIB_IRQMP_MASK_OFFSET, 0);
 }
 
@@ -64,4 +66,5 @@
 void grlib_irqmp_clear(grlib_irqmp_t *irqc, int inum)
 {
+	inum++;
 	pio_write_32(&irqc->regs->clear, (1 << inum));
 }
@@ -69,18 +72,20 @@
 void grlib_irqmp_mask(grlib_irqmp_t *irqc, int src)
 {
-	uint32_t mask = pio_read_32((void *)&irqc->regs + GRLIB_IRQMP_MASK_OFFSET);
+	uint32_t mask = pio_read_32((void *)irqc->regs + GRLIB_IRQMP_MASK_OFFSET);
 
+	src++;
 	mask &= ~(1 << src);
 
-	pio_write_32((void *)&irqc->regs + GRLIB_IRQMP_MASK_OFFSET, mask);
+	pio_write_32((void *)irqc->regs + GRLIB_IRQMP_MASK_OFFSET, mask);
 }
 
 void grlib_irqmp_unmask(grlib_irqmp_t *irqc, int src)
 {
-	uint32_t mask = pio_read_32((void *)&irqc->regs + GRLIB_IRQMP_MASK_OFFSET);
+	uint32_t mask = pio_read_32((void *)irqc->regs + GRLIB_IRQMP_MASK_OFFSET);
 
+	src++;
 	mask |= (1 << src);
 
-	pio_write_32((void *)&irqc->regs + GRLIB_IRQMP_MASK_OFFSET, mask);
+	pio_write_32((void *)irqc->regs + GRLIB_IRQMP_MASK_OFFSET, mask);
 }
 
Index: kernel/genarch/src/drivers/grlib_uart/grlib_uart.c
===================================================================
--- kernel/genarch/src/drivers/grlib_uart/grlib_uart.c	(revision 13c94f72bf34f8a9e3b97905dfe64392001645d6)
+++ kernel/genarch/src/drivers/grlib_uart/grlib_uart.c	(revision d78314585b84d27c6872ccb1a4322113515b7907)
@@ -109,4 +109,6 @@
 outdev_t *grlib_uart_init(uintptr_t paddr, inr_t inr)
 {
+	printf("grlib_uart_init: paddr=0x%08x\n", paddr);
+
 	outdev_t *uart_dev = malloc(sizeof(outdev_t), FRAME_ATOMIC);
 	if (!uart_dev)
