Index: uspace/srv/hid/input/Makefile
===================================================================
--- uspace/srv/hid/input/Makefile	(revision 405b67c762b3d9e7646b77e3813c5ac9bfd3badd)
+++ uspace/srv/hid/input/Makefile	(revision 2a72d9fbcffe5d34ff500bcdfb95b61bec9bac9d)
@@ -30,4 +30,6 @@
 USPACE_PREFIX = ../../..
 BINARY = input
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
 
 SOURCES = \
Index: uspace/srv/hid/input/input.c
===================================================================
--- uspace/srv/hid/input/input.c	(revision 405b67c762b3d9e7646b77e3813c5ac9bfd3badd)
+++ uspace/srv/hid/input/input.c	(revision 2a72d9fbcffe5d34ff500bcdfb95b61bec9bac9d)
@@ -54,4 +54,6 @@
 #include <loc.h>
 #include <str_error.h>
+#include <char_dev_iface.h>
+#include <fibril.h>
 #include "layout.h"
 #include "kbd.h"
@@ -60,4 +62,5 @@
 #include "mouse.h"
 #include "mouse_proto.h"
+#include "serial.h"
 #include "input.h"
 
@@ -97,4 +100,7 @@
 /** List of mouse devices */
 static list_t mouse_devs;
+
+/** List of serial devices */
+static list_t serial_devs;
 
 static FIBRIL_MUTEX_INITIALIZE(discovery_lock);
@@ -395,5 +401,5 @@
 	mouse_dev_t *mdev = calloc(1, sizeof(mouse_dev_t));
 	if (mdev == NULL) {
-		printf("%s: Error allocating keyboard device. "
+		printf("%s: Error allocating mouse device. "
 		    "Out of memory.\n", NAME);
 		return NULL;
@@ -403,4 +409,24 @@
 	
 	return mdev;
+}
+
+static serial_dev_t *serial_dev_new(void)
+{
+	serial_dev_t *sdev = calloc(1, sizeof(serial_dev_t));
+	if (sdev == NULL) {
+		printf("%s: Error allocating serial device. "
+		    "Out of memory.\n", NAME);
+		return NULL;
+	}
+	
+	sdev->kdev = kbd_dev_new();
+	if (sdev->kdev == NULL) {
+		free(sdev);
+		return NULL;
+	}
+
+	link_initialize(&sdev->link);
+	
+	return sdev;
 }
 
@@ -532,4 +558,64 @@
 	return -1;
 }
+
+static int serial_consumer(void *arg)
+{
+	serial_dev_t *sdev = (serial_dev_t *) arg;
+
+	while (true) {
+		uint8_t data;
+
+		char_dev_read(sdev->sess, &data, sizeof(data));
+		kbd_push_data(sdev->kdev, data);
+	}
+
+	return EOK;
+}
+
+/** Add new serial console device.
+ *
+ * @param service_id Service ID of the chardev device
+ *
+ */
+static int serial_add_srldev(service_id_t service_id, serial_dev_t **sdevp)
+{
+	serial_dev_t *sdev = serial_dev_new();
+	if (sdev == NULL)
+		return -1;
+	
+	sdev->kdev->svc_id = service_id;
+	sdev->kdev->port_ops = NULL;
+	sdev->kdev->ctl_ops = &stty_ctl;
+	
+	sdev->sess = loc_service_connect(service_id, INTERFACE_DDF,
+	    IPC_FLAG_BLOCKING);
+
+	int rc = loc_service_get_name(service_id, &sdev->kdev->svc_name);
+	if (rc != EOK) {
+		sdev->kdev->svc_name = NULL;
+		goto fail;
+	}
+
+	/* Initialize controller driver. */
+	if ((*sdev->kdev->ctl_ops->init)(sdev->kdev) != 0) {
+		goto fail;
+	}
+	
+	list_append(&sdev->link, &serial_devs);
+
+	fid_t fid = fibril_create(serial_consumer, sdev);
+	fibril_add_ready(fid);
+	
+	*sdevp = sdev;
+	return EOK;
+	
+fail:
+	if (sdev->kdev->svc_name != NULL)
+		free(sdev->kdev->svc_name);
+	free(sdev->kdev);
+	free(sdev);
+	return -1;
+}
+
 
 /** Add legacy drivers/devices. */
@@ -555,7 +641,4 @@
 	kbd_add_dev(&niagara_port, &stty_ctl);
 #endif
-#if defined(UARCH_sparc64) && defined(MACHINE_generic)
-	kbd_add_dev(&ns16550_port, &sun_ctl);
-#endif
 	/* Silence warning on abs32le about kbd_add_dev() being unused */
 	(void) kbd_add_dev;
@@ -678,4 +761,55 @@
 }
 
+static int dev_check_new_serialdevs(void)
+{
+	category_id_t serial_cat;
+	service_id_t *svcs;
+	size_t count, i;
+	bool already_known;
+	int rc;
+	
+	rc = loc_category_get_id("serial", &serial_cat, IPC_FLAG_BLOCKING);
+	if (rc != EOK) {
+		printf("%s: Failed resolving category 'serial'.\n", NAME);
+		return ENOENT;
+	}
+	
+	/*
+	 * Check for new serial devices
+	 */
+	rc = loc_category_get_svcs(serial_cat, &svcs, &count);
+	if (rc != EOK) {
+		printf("%s: Failed getting list of serial devices.\n",
+		    NAME);
+		return EIO;
+	}
+
+	for (i = 0; i < count; i++) {
+		already_known = false;
+		
+		/* Determine whether we already know this device. */
+		list_foreach(serial_devs, link, serial_dev_t, sdev) {
+			if (sdev->kdev->svc_id == svcs[i]) {
+				already_known = true;
+				break;
+			}
+		}
+		
+		if (!already_known) {
+			serial_dev_t *sdev;
+			if (serial_add_srldev(svcs[i], &sdev) == EOK) {
+				printf("%s: Connected serial device '%s'\n",
+				    NAME, sdev->kdev->svc_name);
+			}
+		}
+	}
+	
+	free(svcs);
+	
+	/* XXX Handle device removal */
+	
+	return EOK;
+}
+
 static int dev_check_new(void)
 {
@@ -691,4 +825,10 @@
 	
 	rc = dev_check_new_mousedevs();
+	if (rc != EOK) {
+		fibril_mutex_unlock(&discovery_lock);
+		return rc;
+	}
+
+	rc = dev_check_new_serialdevs();
 	if (rc != EOK) {
 		fibril_mutex_unlock(&discovery_lock);
@@ -738,4 +878,5 @@
 	list_initialize(&kbd_devs);
 	list_initialize(&mouse_devs);
+	list_initialize(&serial_devs);
 	
 	if ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio))
Index: uspace/srv/hid/input/serial.h
===================================================================
--- uspace/srv/hid/input/serial.h	(revision 2a72d9fbcffe5d34ff500bcdfb95b61bec9bac9d)
+++ uspace/srv/hid/input/serial.h	(revision 2a72d9fbcffe5d34ff500bcdfb95b61bec9bac9d)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup inputgen generic
+ * @brief Serial device handling.
+ * @ingroup input
+ * @{
+ */
+/** @file
+ */
+
+#ifndef SERIAL_H_
+#define SERIAL_H_
+
+#include <async.h>
+#include "kbd.h"
+
+typedef struct serial_dev {
+	kbd_dev_t *kdev;
+	link_t link;
+	async_sess_t *sess;
+} serial_dev_t;
+
+#endif
+
+/**
+ * @}
+ */
