Index: boot/arch/amd64/Makefile.inc
===================================================================
--- boot/arch/amd64/Makefile.inc	(revision 5dc96227c454d26dad2ed3642e8fb99b68d212c8)
+++ boot/arch/amd64/Makefile.inc	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
@@ -40,5 +40,6 @@
 	rootia32 \
 	pciintel \
-	isa
+	isa \
+	serial
 
 RD_DRV_CONF = \
Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 5dc96227c454d26dad2ed3642e8fb99b68d212c8)
+++ uspace/Makefile	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
@@ -80,4 +80,5 @@
 	DIRS += srv/drivers/pciintel
 	DIRS += srv/drivers/isa
+	DIRS += srv/drivers/serial
 #	DIRS += srv/hw/bus/pci
 endif
Index: uspace/srv/drivers/isa/isa.c
===================================================================
--- uspace/srv/drivers/isa/isa.c	(revision 5dc96227c454d26dad2ed3642e8fb99b68d212c8)
+++ uspace/srv/drivers/isa/isa.c	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
@@ -312,5 +312,5 @@
 	char *end = val;
 	
-	while (isspace(*end)) {
+	while (!isspace(*end)) {
 		end++;
 	}	
@@ -330,6 +330,7 @@
 	val = skip_spaces(val);	
 	
-	score = (int)strtol(val, &end, 0x10);
+	score = (int)strtol(val, &end, 10);
 	if (val == end) {
+		printf(NAME " : error - could not read match score for device %s.\n", dev->name);
 		return;
 	}
@@ -337,4 +338,5 @@
 	match_id_t *match_id = create_match_id();
 	if (NULL == match_id) {
+		printf(NAME " : failed to allocate match id for device %s.\n", dev->name);
 		return;
 	}
@@ -343,4 +345,5 @@
 	get_match_id(&id, val);
 	if (NULL == id) {
+		printf(NAME " : error - could not read match id for device %s.\n", dev->name);
 		delete_match_id(match_id);
 		return;
@@ -350,21 +353,32 @@
 	match_id->score = score;
 	
+	printf(NAME ": adding match id %s with score %d to device %s\n", id, score, dev->name);
 	add_match_id(&dev->match_ids, match_id);
 }
 
+static bool read_dev_prop(
+	device_t *dev, char *line, const char *prop, void (* read_fn)(device_t *, char *)) 
+{
+	size_t proplen = str_size(prop);
+	if (0 == str_lcmp(line, prop, proplen)) {
+		line += proplen;
+		line = skip_spaces(line);
+		(*read_fn)(dev, line);
+		return true;
+	}
+	return false;		
+}
+
 static void get_dev_prop(device_t *dev, char *line)
 {
+	printf(NAME " get_dev_prop from line '%s'\n", line);
 	// skip leading spaces
 	line = skip_spaces(line);
 	
-	// value of the property
-	char *val;
-	
-	if (NULL != (val = strtok(line, "io_range"))) {		
-		get_dev_io_range(dev, val);
-	} else if (NULL != (val = strtok(line, "irq"))) {
-		get_dev_irq(dev, val);		
-	} else if (NULL != (val = strtok(line, "match"))) {
-		get_dev_match_id(dev, val);
+	if (!read_dev_prop(dev, line, "io_range", &get_dev_io_range) &&
+		!read_dev_prop(dev, line, "irq", &get_dev_irq) &&
+		!read_dev_prop(dev, line, "match", &get_dev_match_id)
+	) {		
+		printf(NAME " error undefined device property at line %s\n", line);
 	} 	
 }
@@ -397,4 +411,7 @@
 	}
 	
+	printf(NAME ": next line ='%s'\n", dev_conf);
+	printf(NAME ": current line ='%s'\n", line);
+	
 	// get device name
 	dev_name = get_device_name(line);
@@ -424,4 +441,7 @@
 		// get the device's property from the configuration line and store it in the device structure
 		get_dev_prop(dev, line);
+		
+		printf(NAME ": next line ='%s'\n", dev_conf);
+		printf(NAME ": current line ='%s'\n", line);		
 	}
 	
@@ -429,5 +449,5 @@
 	dev->class = &isa_child_class;
 	
-	child_device_register(dev, parent);
+	child_device_register(dev, parent);	
 	
 	return dev_conf;	
@@ -456,4 +476,5 @@
 	// add child devices	
 	add_legacy_children(dev);
+	printf(NAME ": finished the enumeration of legacy devices\n", dev->handle);
 	
 	return true;
Index: uspace/srv/drivers/serial/Makefile
===================================================================
--- uspace/srv/drivers/serial/Makefile	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
+++ uspace/srv/drivers/serial/Makefile	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
@@ -0,0 +1,38 @@
+# Copyright (c) 2010 Lenka Trochtova
+# 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.
+#
+
+USPACE_PREFIX = ../../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBC_PREFIX)/libc.a
+
+OUTPUT = serial
+
+SOURCES = \
+	serial.c
+
+include ../../Makefile.common
+
+EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
Index: uspace/srv/drivers/serial/serial.c
===================================================================
--- uspace/srv/drivers/serial/serial.c	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
+++ uspace/srv/drivers/serial/serial.c	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup serial Serial port driver.
+ * @brief HelenOS serial port driver.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <macros.h>
+#include <malloc.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <driver.h>
+#include <resource.h>
+
+#include <devman.h>
+#include <ipc/devman.h>
+#include <device/hw_res.h>
+
+#define NAME "serial"
+
+typedef struct serial_dev_data {
+		
+} serial_dev_data_t;
+
+
+static device_class_t serial_dev_class;
+
+static bool serial_add_device(device_t *dev);
+
+/** The serial port device driver's standard operations.
+ */
+static driver_ops_t serial_ops = {
+	.add_device = &serial_add_device
+};
+
+/** The serial port device driver structure. 
+ */
+static driver_t serial_driver = {
+	.name = NAME,
+	.driver_ops = &serial_ops
+};
+
+static bool serial_add_device(device_t *dev) 
+{
+	printf(NAME ": serial_add_device, device handle = %d\n", dev->handle);
+	
+	// TODO
+	
+	return true;
+}
+
+static void serial_init() 
+{
+	// TODO
+	serial_dev_class.id = 0;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS serial port driver\n");	
+	serial_init();
+	return driver_main(&serial_driver);
+}
+
+/**
+ * @}
+ */
Index: uspace/srv/drivers/serial/serial.ma
===================================================================
--- uspace/srv/drivers/serial/serial.ma	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
+++ uspace/srv/drivers/serial/serial.ma	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
@@ -0,0 +1,1 @@
+10 isa/serial
