Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision d7e3f1ade9ff58d20053f91aafb424534a868c2e)
+++ kernel/genarch/src/fb/fb.c	(revision 208fa65660addbbf3528a9906e20dfdbf552bc78)
@@ -61,4 +61,9 @@
 static unsigned int bitspp = 0;
 static unsigned int pixelbytes = 0;
+#ifdef FB_INVERT_COLORS
+static bool invert_colors = true;
+#else
+static bool invert_colors = false;
+#endif
 
 static unsigned int position = 0;
@@ -66,5 +71,4 @@
 static unsigned int rows = 0;
 
-
 #define COL_WIDTH	8
 #define ROW_BYTES	(scanline * FONT_SCANLINES)
@@ -85,4 +89,9 @@
 static void (*rgb2scr)(void *, int);
 static int (*scr2rgb)(void *);
+
+static inline int COLOR(int color)
+{
+	return invert_colors ? ~color : color;
+}
 
 /* Conversion routines between different color representations */
@@ -160,9 +169,9 @@
 static void putpixel(unsigned int x, unsigned int y, int color)
 {
-	(*rgb2scr)(&fbaddress[POINTPOS(x,y)],color);
+	(*rgb2scr)(&fbaddress[POINTPOS(x,y)], COLOR(color));
 
 	if (dbbuffer) {
 		int dline = (y + dboffset) % yres;
-		(*rgb2scr)(&dbbuffer[POINTPOS(x,dline)],color);
+		(*rgb2scr)(&dbbuffer[POINTPOS(x,dline)], COLOR(color));
 	}
 }
@@ -173,7 +182,7 @@
 	if (dbbuffer) {
 		int dline = (y + dboffset) % yres;
-		return (*scr2rgb)(&dbbuffer[POINTPOS(x,dline)]);
-	}
-	return (*scr2rgb)(&fbaddress[POINTPOS(x,y)]);
+		return COLOR((*scr2rgb)(&dbbuffer[POINTPOS(x,dline)]));
+	}
+	return COLOR((*scr2rgb)(&fbaddress[POINTPOS(x,y)]));
 }
 
@@ -275,5 +284,5 @@
 			byte >>= x % 8;
 			if (byte & 1)
-				putpixel(startx + x, starty + y, LOGOCOLOR);
+				putpixel(startx + x, starty + y, COLOR(LOGOCOLOR));
 		}
 }
@@ -398,4 +407,5 @@
 	sysinfo_set_item_val("fb.scanline", NULL, scan);
 	sysinfo_set_item_val("fb.address.physical", NULL, addr);
+	sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors);
 
 	/* Allocate double buffer */
@@ -417,7 +427,9 @@
 	if (!blankline)
 		panic("Failed to allocate blank line for framebuffer.");
-	for (y=0; y < FONT_SCANLINES; y++)
-		for (x=0; x < xres; x++)
-			(*rgb2scr)(&blankline[POINTPOS(x,y)],BGCOLOR);
+	for (y=0; y < FONT_SCANLINES; y++) {
+		for (x=0; x < xres; x++) {
+			(*rgb2scr)(&blankline[POINTPOS(x,y)], COLOR(BGCOLOR));
+		}
+	}
 
 	clear_screen();
Index: kernel/genarch/src/kbd/key.c
===================================================================
--- kernel/genarch/src/kbd/key.c	(revision d7e3f1ade9ff58d20053f91aafb424534a868c2e)
+++ kernel/genarch/src/kbd/key.c	(revision 208fa65660addbbf3528a9906e20dfdbf552bc78)
@@ -68,9 +68,9 @@
 	spinlock_lock(&keylock);
 	switch (sc) {
-	    case SC_LSHIFT:
-	    case SC_RSHIFT:
+	case SC_LSHIFT:
+	case SC_RSHIFT:
 		keyflags &= ~PRESSED_SHIFT;
 		break;
-	    case SC_CAPSLOCK:
+	case SC_CAPSLOCK:
 		keyflags &= ~PRESSED_CAPSLOCK;
 		if (lockflags & LOCKED_CAPSLOCK)
@@ -79,5 +79,5 @@
 			lockflags |= LOCKED_CAPSLOCK;
 		break;
-	    default:
+	default:
 		break;
 	}
Index: kernel/genarch/src/kbd/z8530.c
===================================================================
--- kernel/genarch/src/kbd/z8530.c	(revision d7e3f1ade9ff58d20053f91aafb424534a868c2e)
+++ kernel/genarch/src/kbd/z8530.c	(revision 208fa65660addbbf3528a9906e20dfdbf552bc78)
@@ -42,4 +42,5 @@
 #include <arch/drivers/z8530.h>
 #include <arch/interrupt.h>
+#include <arch/drivers/kbd.h>
 #include <cpu.h>
 #include <arch/asm.h>
@@ -49,4 +50,6 @@
 #include <console/console.h>
 #include <interrupt.h>
+#include <sysinfo/sysinfo.h>
+#include <print.h>
 
 /*
@@ -54,4 +57,6 @@
  */
 #define IGNORE_CODE	0x7f		/* all keys up */
+
+bool z8530_belongs_to_kernel = true;
 
 static void z8530_suspend(chardev_t *);
@@ -70,4 +75,5 @@
 void z8530_grab(void)
 {
+	z8530_belongs_to_kernel = true;
 }
 
@@ -75,4 +81,5 @@
 void z8530_release(void)
 {
+	z8530_belongs_to_kernel = false;
 }
 
@@ -83,12 +90,22 @@
 	stdin = &kbrd;
 
+	sysinfo_set_item_val("kbd", NULL, true);
+	sysinfo_set_item_val("kbd.irq", NULL, 0);
+	sysinfo_set_item_val("kbd.address.virtual", NULL, (uintptr_t) kbd_virt_address);
+
 	(void) z8530_read_a(RR8);
 
-	z8530_write_a(WR1, WR1_IARCSC);	/* interrupt on all characters */
+	/*
+	 * Clear any pending TX interrupts or we never manage
+	 * to set FHC UART interrupt state to idle.
+	 */
+	z8530_write_a(WR0, WR0_TX_IP_RST);
+
+	z8530_write_a(WR1, WR1_IARCSC);		/* interrupt on all characters */
 
 	/* 8 bits per character and enable receiver */
 	z8530_write_a(WR3, WR3_RX8BITSCH | WR3_RX_ENABLE);
 	
-	z8530_write_a(WR9, WR9_MIE);	/* Master Interrupt Enable. */
+	z8530_write_a(WR9, WR9_MIE);		/* Master Interrupt Enable. */
 	
 	/*
