Index: kernel/genarch/src/kbd/ns16550.c
===================================================================
--- kernel/genarch/src/kbd/ns16550.c	(revision 233af8c563ae6dbff256dbcf9920cbce40be88d0)
+++ kernel/genarch/src/kbd/ns16550.c	(revision e2cc9a09d69ac8aab988fa3f12b67e7a42704641)
@@ -91,4 +91,9 @@
 	sysinfo_set_item_val("kbd.irq", NULL, 0);
 	sysinfo_set_item_val("kbd.address.virtual", NULL, (uintptr_t) kbd_virt_address);
+	
+	ns16550_ier_write(IER_ERBFI);				/* enable receiver interrupt */
+	
+	while (ns16550_lsr_read() & LSR_DATA_READY)
+		(void) ns16550_rbr_read();
 }
 
@@ -145,5 +150,5 @@
 	uint8_t x;
 
-	while (((x = ns16550_lsr_read() & LSR_DATA_READY))) {
+	while (ns16550_lsr_read() & LSR_DATA_READY) {
 		x = ns16550_rbr_read();
 		if (x != IGNORE_CODE) {
Index: kernel/genarch/src/ofw/ebus.c
===================================================================
--- kernel/genarch/src/ofw/ebus.c	(revision 233af8c563ae6dbff256dbcf9920cbce40be88d0)
+++ kernel/genarch/src/ofw/ebus.c	(revision e2cc9a09d69ac8aab988fa3f12b67e7a42704641)
@@ -37,5 +37,7 @@
 
 #include <genarch/ofw/ofw_tree.h>
+#include <arch/drivers/pci.h>
 #include <arch/memstr.h>
+#include <arch/trap/interrupt.h>
 #include <func.h>
 #include <panic.h>
@@ -43,4 +45,5 @@
 #include <macros.h>
 
+/** Apply EBUS ranges to EBUS register. */
 bool ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa)
 {
@@ -113,9 +116,32 @@
 	 * We found the device that functions as an interrupt controller
 	 * for the interrupt. We also found mapping from interrupt to INR.
+	 * What needs to be done now is to verify that this indeed is a PCI
+	 * node.
 	 */
 
 	controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), intr_map[i].controller_handle);
+	if (!controller)
+		return false;
+		
+	if (strcmp(ofw_tree_node_name(controller), "pci") != 0) {
+		/*
+		 * This is not a PCI node.
+		 */
+		return false;
+	}
+
+	pci_t *pci = controller->device;
+	if (!pci) {
+		pci = pci_init(controller);
+		if (!pci)
+			return false;
+		controller->device = pci;
+		
+	}
+	pci_enable_interrupt(pci, intr_map[i].controller_inr);
+
+	*inr = intr_map[i].controller_inr;
+	*inr |= 0x1f << IGN_SHIFT;		/* 0x1f is hardwired IGN */
 	
-	*inr = intr_map[i].controller_inr;
 	return true;
 }
Index: kernel/genarch/src/ofw/upa.c
===================================================================
--- kernel/genarch/src/ofw/upa.c	(revision 233af8c563ae6dbff256dbcf9920cbce40be88d0)
+++ kernel/genarch/src/ofw/upa.c	(revision e2cc9a09d69ac8aab988fa3f12b67e7a42704641)
@@ -46,5 +46,5 @@
 {
 	*pa = reg->addr;
-	return false;
+	return true;
 }
 
