Index: kernel/genarch/include/fb/fb.h
===================================================================
--- kernel/genarch/include/fb/fb.h	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/include/fb/fb.h	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -66,4 +66,6 @@
 
 SPINLOCK_EXTERN(fb_lock);
+
+void fb_redraw(void);
 void fb_init(fb_properties_t *props);
 
Index: kernel/genarch/include/fb/font-8x16.h
===================================================================
--- kernel/genarch/include/fb/font-8x16.h	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/include/fb/font-8x16.h	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -36,8 +36,11 @@
 #define KERN_FONT_8X16_H_
 
-#define FONT_GLIPHS		256
-#define FONT_SCANLINES	16
+#define FONT_GLYPHS      256
+#define FONT_WIDTH       8
+#define FONT_SCANLINES   16
 
-extern unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES];
+#include <arch/types.h>
+
+extern uint8_t fb_font[FONT_GLYPHS * FONT_SCANLINES];
 
 #endif
Index: kernel/genarch/include/fb/visuals.h
===================================================================
--- kernel/genarch/include/fb/visuals.h	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/include/fb/visuals.h	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -36,13 +36,13 @@
 #define KERN_VISUALS_H_
 
-#define VISUAL_INDIRECT_8	0
+#define VISUAL_INDIRECT_8   0
 
-#define VISUAL_RGB_5_5_5	1
-#define VISUAL_RGB_5_6_5	2
-#define VISUAL_RGB_8_8_8	3
-#define VISUAL_RGB_8_8_8_0	4
-#define VISUAL_RGB_0_8_8_8	5
+#define VISUAL_RGB_5_5_5    1
+#define VISUAL_RGB_5_6_5    2
+#define VISUAL_RGB_8_8_8    3
+#define VISUAL_RGB_8_8_8_0  4
+#define VISUAL_RGB_0_8_8_8  5
 
-#define VISUAL_BGR_0_8_8_8	6
+#define VISUAL_BGR_0_8_8_8  6
 
 #endif
Index: kernel/genarch/src/acpi/acpi.c
===================================================================
--- kernel/genarch/src/acpi/acpi.c	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/src/acpi/acpi.c	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -50,6 +50,10 @@
 struct acpi_xsdt *acpi_xsdt = NULL;
 
-struct acpi_signature_map signature_map[] = { 
-	{ (uint8_t *)"APIC", (void *) &acpi_madt, "Multiple APIC Description Table" }
+struct acpi_signature_map signature_map[] = {
+	{
+		(uint8_t *) "APIC",
+		(void *) &acpi_madt,
+		"Multiple APIC Description Table"
+	}
 };
 
@@ -106,5 +110,5 @@
 					goto next;
 				*signature_map[j].sdt_ptr = h;
-				printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
+				LOG("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
 			}
 		}
@@ -127,5 +131,5 @@
 					goto next;
 				*signature_map[j].sdt_ptr = h;
-				printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
+				LOG("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
 			}
 		}
@@ -161,5 +165,5 @@
 
 rsdp_found:
-	printf("%p: ACPI Root System Description Pointer\n", acpi_rsdp);
+	LOG("%p: ACPI Root System Description Pointer\n", acpi_rsdp);
 
 	acpi_rsdt = (struct acpi_rsdt *) (unative_t) acpi_rsdp->rsdt_address;
Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/src/fb/fb.c	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -1,3 +1,4 @@
 /*
+ * Copyright (c) 2008 Martin Decky
  * Copyright (c) 2006 Ondrej Palkovsky
  * All rights reserved.
@@ -27,5 +28,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -40,4 +41,5 @@
 #include <sysinfo/sysinfo.h>
 #include <mm/slab.h>
+#include <align.h>
 #include <panic.h>
 #include <memstr.h>
@@ -48,135 +50,107 @@
 #include <arch/types.h>
 
-#include "helenos.xbm"
-
-static parea_t fb_parea;		/**< Physical memory area for fb. */
-
 SPINLOCK_INITIALIZE(fb_lock);
 
-static uint8_t *fbaddress = NULL;
-
-static uint8_t *blankline = NULL;
-static uint8_t *dbbuffer = NULL;	/* Buffer for fast scrolling console */
-static index_t dboffset;
-
-static unsigned int xres = 0;
-static unsigned int yres = 0;
-static unsigned int scanline = 0;
-static unsigned int pixelbytes = 0;
-#ifdef FB_INVERT_COLORS
-static bool invert_colors = true;
+/**< Physical memory area for fb. */
+static parea_t fb_parea;
+
+static uint8_t *fb_addr;
+static uint8_t *backbuf;
+static uint8_t *glyphs;
+
+static void *bgpixel;
+
+static unsigned int xres;
+static unsigned int yres;
+
+static unsigned int scanline;
+static unsigned int glyphscanline;
+
+static unsigned int pixelbytes;
+static unsigned int glyphbytes;
+
+static unsigned int cols;
+static unsigned int rows;
+static unsigned int position = 0;
+
+#define BG_COLOR     0x000080
+#define FG_COLOR     0xffff00
+
+#define CURSOR       219
+
+#define RED(x, bits)         ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1))
+#define GREEN(x, bits)       ((x >> (8 + 8 - bits)) & ((1 << bits) - 1))
+#define BLUE(x, bits)        ((x >> (8 - bits)) & ((1 << bits) - 1))
+
+#define COL2X(col)           ((col) * FONT_WIDTH)
+#define ROW2Y(row)           ((row) * FONT_SCANLINES)
+
+#define X2COL(x)             ((x) / FONT_WIDTH)
+#define Y2ROW(y)             ((y) / FONT_SCANLINES)
+
+#define FB_POS(x, y)         ((y) * scanline + (x) * pixelbytes)
+#define BB_POS(col, row)     ((row) * cols + (col))
+#define GLYPH_POS(glyph, y)  ((glyph) * glyphbytes + (y) * glyphscanline)
+
+
+static void (*rgb_conv)(void *, uint32_t);
+
+
+/** ARGB 8:8:8:8 conversion
+ *
+ */
+static void rgb_0888(void *dst, uint32_t rgb)
+{
+	*((uint32_t *) dst) = rgb & 0xffffff;
+}
+
+
+/** ABGR 8:8:8:8 conversion
+ *
+ */
+static void bgr_0888(void *dst, uint32_t rgb)
+{
+	*((uint32_t *) dst)
+	    = (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8);
+}
+
+
+/** BGR 8:8:8 conversion
+ *
+ */
+static void rgb_888(void *dst, uint32_t rgb)
+{
+#if defined(FB_INVERT_ENDIAN)
+	*((uint32_t *) dst)
+	    = (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8)
+	    | (*((uint32_t *) dst) & 0xff0000);
 #else
-static bool invert_colors = false;
+	*((uint32_t *) dst)
+	    = (rgb & 0xffffff) | (*((uint32_t *) dst) & 0xff0000);
 #endif
-
-static unsigned int position = 0;
-static unsigned int columns = 0;
-static unsigned int rows = 0;
-
-#define COL_WIDTH	8
-#define ROW_BYTES	(scanline * FONT_SCANLINES)
-
-#define BGCOLOR		0x000080
-#define FGCOLOR		0xffff00
-#define LOGOCOLOR	0x2020b0
-
-#define RED(x, bits)	((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1))
-#define GREEN(x, bits)	((x >> (8 + 8 - bits)) & ((1 << bits) - 1))
-#define BLUE(x, bits)	((x >> (8 - bits)) & ((1 << bits) - 1))
-
-#define POINTPOS(x, y)	((y) * scanline + (x) * pixelbytes)
-
-/***************************************************************/
-/* Pixel specific fuctions */
-
-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 */
-static void rgb_byte0888(void *dst, int rgb)
-{
-	*((int *) dst) = rgb;
-}
-
-static int byte0888_rgb(void *src)
-{
-	return (*((int *) src)) & 0xffffff;
-}
-
-static void bgr_byte0888(void *dst, int rgb)
-{
-	*((uint32_t *) dst) = BLUE(rgb, 8) << 16 | GREEN(rgb, 8) << 8 |
-	    RED(rgb, 8);
-}
-
-static int byte0888_bgr(void *src)
-{
-	int color = *(uint32_t *)(src);
-	return ((color & 0xff) << 16) | (((color >> 8) & 0xff) << 8) |
-	    ((color >> 16) & 0xff);
-}
-
-static void rgb_byte888(void *dst, int rgb)
-{
-	uint8_t *scr = (uint8_t *) dst;
-#if defined(FB_INVERT_ENDIAN)
-	scr[0] = RED(rgb, 8);
-	scr[1] = GREEN(rgb, 8);
-	scr[2] = BLUE(rgb, 8);
-#else
-	scr[2] = RED(rgb, 8);
-	scr[1] = GREEN(rgb, 8);
-	scr[0] = BLUE(rgb, 8);
-#endif
-}
-
-static int byte888_rgb(void *src)
-{
-	uint8_t *scr = (uint8_t *) src;
-#if defined(FB_INVERT_ENDIAN)
-	return scr[0] << 16 | scr[1] << 8 | scr[2];
-#else
-	return scr[2] << 16 | scr[1] << 8 | scr[0];
-#endif	
-}
-
-/**  16-bit depth (5:5:5) */
-static void rgb_byte555(void *dst, int rgb)
-{
-	/* 5-bit, 5-bits, 5-bits */ 
-	*((uint16_t *) dst) = RED(rgb, 5) << 10 | GREEN(rgb, 5) << 5 |
-	    BLUE(rgb, 5);
-}
-
-/** 16-bit depth (5:5:5) */
-static int byte555_rgb(void *src)
-{
-	int color = *(uint16_t *)(src);
-	return (((color >> 10) & 0x1f) << (16 + 3)) |
-	    (((color >> 5) & 0x1f) << (8 + 3)) | ((color & 0x1f) << 3);
-}
-
-/**  16-bit depth (5:6:5) */
-static void rgb_byte565(void *dst, int rgb)
-{
-	/* 5-bit, 6-bits, 5-bits */ 
-	*((uint16_t *) dst) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 |
-	    BLUE(rgb, 5);
-}
-
-/** 16-bit depth (5:6:5) */
-static int byte565_rgb(void *src)
-{
-	int color = *(uint16_t *)(src);
-	return (((color >> 11) & 0x1f) << (16 + 3)) |
-	    (((color >> 5) & 0x3f) << (8 + 2)) | ((color & 0x1f) << 3);
-}
-
-/** Put pixel - 8-bit depth (color palette/3:2:3, inverted)
+}
+
+
+/** RGB 5:5:5 conversion
+ *
+ */
+static void rgb_555(void *dst, uint32_t rgb)
+{
+	*((uint16_t *) dst)
+	    = (RED(rgb, 5) << 10) | (GREEN(rgb, 5) << 5) | BLUE(rgb, 5);
+}
+
+
+/** RGB 5:6:5 conversion
+ *
+ */
+static void rgb_565(void *dst, uint32_t rgb)
+{
+	*((uint16_t *) dst)
+	    = (RED(rgb, 5) << 11) | (GREEN(rgb, 6) << 5) | BLUE(rgb, 5);
+}
+
+
+/** RGB 3:2:3
  *
  * Even though we try 3:2:3 color scheme here, an 8-bit framebuffer
@@ -186,5 +160,5 @@
  * and setting it to simulate the 8-bit truecolor.
  *
- * Currently we set the palette on the sparc64 port.
+ * Currently we set the palette on the ia32 and sparc64 port.
  *
  * Note that the byte is being inverted by this function. The reason is
@@ -194,205 +168,82 @@
  * 0 and 255 to other colors.
  */
-static void rgb_byte8(void *dst, int rgb)
-{
-	*((uint8_t *) dst) = 255 - (RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 |
-	    BLUE(rgb, 3));
-}
-
-/** Return pixel color - 8-bit depth (color palette/3:2:3)
- *
- * See the comment for rgb_byte().
- */
-static int byte8_rgb(void *src)
-{
-	int color = 255 - (*(uint8_t *)src);
-	return (((color >> 5) & 0x7) << (16 + 5)) |
-	    (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5);
-}
-
-static void putpixel(unsigned int x, unsigned int y, int color)
-{
-	(*rgb2scr)(&fbaddress[POINTPOS(x, y)], COLOR(color));
-
-	if (dbbuffer) {
-		int dline = (y + dboffset) % yres;
-		(*rgb2scr)(&dbbuffer[POINTPOS(x, dline)], COLOR(color));
-	}
-}
-
-/** Get pixel from viewport */
-static int getpixel(unsigned int x, unsigned int y)
-{
-	if (dbbuffer) {
-		int dline = (y + dboffset) % yres;
-		return COLOR((*scr2rgb)(&dbbuffer[POINTPOS(x, dline)]));
-	}
-	return COLOR((*scr2rgb)(&fbaddress[POINTPOS(x, y)]));
-}
-
-
-/** Fill screen with background color */
-static void clear_screen(void)
-{
-	unsigned int y;
-
-	for (y = 0; y < yres; y++) {
-		memcpy(&fbaddress[scanline * y], blankline, xres * pixelbytes);
-		if (dbbuffer)
-			memcpy(&dbbuffer[scanline * y], blankline,
-			    xres * pixelbytes);
-	}
-}
-
-
-/** Scroll screen one row up */
+static void rgb_323(void *dst, uint32_t rgb)
+{
+	*((uint8_t *) dst)
+	    = ~((RED(rgb, 3) << 5) | (GREEN(rgb, 2) << 3) | BLUE(rgb, 3));
+}
+
+
+/** Draw character at given position
+ *
+ */
+static void draw_glyph(uint8_t glyph, unsigned int col, unsigned int row)
+{
+	unsigned int x = COL2X(col);
+	unsigned int y = ROW2Y(row);
+	unsigned int yd;
+	
+	backbuf[BB_POS(col, row)] = glyph;
+	
+	for (yd = 0; yd < FONT_SCANLINES; yd++)
+		memcpy(&fb_addr[FB_POS(x, y + yd)],
+		    &glyphs[GLYPH_POS(glyph, yd)], glyphscanline);
+}
+
+
+/** Scroll screen down by one row
+ *
+ *
+ */
 static void scroll_screen(void)
 {
-	if (dbbuffer) {
-		count_t first;
+	unsigned int row;
+	
+	for (row = 0; row < rows; row++) {
+		unsigned int y = ROW2Y(row);
+		unsigned int yd;
 		
-		/* Clear the last row */
-		memcpy(&dbbuffer[dboffset * scanline], blankline, ROW_BYTES);
-		
-		dboffset = (dboffset + FONT_SCANLINES) % yres;
-		first = yres - dboffset;
-		
-		/* Move all rows one row up */
-		if (xres * pixelbytes == scanline) {
-			memcpy(fbaddress, &dbbuffer[dboffset * scanline],
-			    first * scanline);
-			memcpy(&fbaddress[first * scanline], dbbuffer,
-			    dboffset * scanline);
-		} else {
-			/*
-			 * When the scanline is bigger than number of bytes
-			 * in the X-resolution, chances are that the
-			 * frame buffer memory past the X-resolution is special
-			 * in some way. For example, the SUNW,ffb framebuffer
-			 * wraps this area around the beginning of the same
-			 * line. To avoid troubles, copy only memory as
-			 * specified by the resolution.
-			 */
-			unsigned int i;
-
-			for (i = 0; i < first; i++)
-				memcpy(&fbaddress[i * scanline],
-				    &dbbuffer[(dboffset + i) * scanline],
-				    xres * pixelbytes);
-			for (i = 0; i < dboffset; i++)
-				memcpy(&fbaddress[(first + i) * scanline],
-				    &dbbuffer[i * scanline], xres * pixelbytes);
+		for (yd = 0; yd < FONT_SCANLINES; yd++) {
+			unsigned int x;
+			unsigned int col;
+			
+			for (col = 0, x = 0; col < cols; col++, x += FONT_WIDTH) {
+				uint8_t glyph;
+				
+				if (row < rows - 1) {
+					if (backbuf[BB_POS(col, row)] == backbuf[BB_POS(col, row + 1)])
+						continue;
+					
+					glyph = backbuf[BB_POS(col, row + 1)];
+				} else
+					glyph = 0;
+				
+				memcpy(&fb_addr[FB_POS(x, y + yd)],
+				    &glyphs[GLYPH_POS(glyph, yd)], glyphscanline);
+			}
 		}
-	} else {
-		uint8_t *lastline = &fbaddress[(rows - 1) * ROW_BYTES];
-		
-		if (xres * pixelbytes == scanline) {
-			/* Move all rows one row up */
-			memcpy((void *) fbaddress,
-			    (void *) &fbaddress[ROW_BYTES],
-			    scanline * yres - ROW_BYTES);
-			/* Clear the last row */
-			memcpy((void *) lastline, (void *) blankline,
-			    ROW_BYTES);
-		} else {
-			/*
-			 * See the comment in the dbbuffer case.
-			 */
-			unsigned int i;
-
-			/* Move all rows one row up */
-			for (i = 0; i < yres - FONT_SCANLINES; i++)
-				memcpy(&fbaddress[i * scanline],
-				    &fbaddress[(i + FONT_SCANLINES) * scanline],
-				    xres * pixelbytes);
-			/* Clear the last row */
-			for (i = 0; i < FONT_SCANLINES; i++)
-				memcpy(&lastline[i * scanline],
-				    &blankline[i * scanline],
-				    xres * pixelbytes);
-		}
-	}
-}
-
-
-static void invert_pixel(unsigned int x, unsigned int y)
-{
-	putpixel(x, y, ~getpixel(x, y));
-}
-
-
-/** Draw one line of glyph at a given position */
-static void draw_glyph_line(unsigned int glline, unsigned int x, unsigned int y)
-{
-	unsigned int i;
-
-	for (i = 0; i < 8; i++)
-		if (glline & (1 << (7 - i))) {
-			putpixel(x + i, y, FGCOLOR);
-		} else
-			putpixel(x + i, y, BGCOLOR);
-}
-
-/***************************************************************/
-/* Character-console functions */
-
-/** Draw character at given position */
-static void draw_glyph(uint8_t glyph, unsigned int col, unsigned int row)
-{
-	unsigned int y;
-
-	for (y = 0; y < FONT_SCANLINES; y++)
-		draw_glyph_line(fb_font[glyph * FONT_SCANLINES + y],
-		    col * COL_WIDTH, row * FONT_SCANLINES + y);
-}
-
-/** Invert character at given position */
-static void invert_char(unsigned int col, unsigned int row)
-{
-	unsigned int x;
-	unsigned int y;
-
-	for (x = 0; x < COL_WIDTH; x++)
-		for (y = 0; y < FONT_SCANLINES; y++)
-			invert_pixel(col * COL_WIDTH + x,
-			    row * FONT_SCANLINES + y);
-}
-
-/** Draw character at default position */
-static void draw_char(char chr)
-{
-	draw_glyph(chr, position % columns, position / columns);
-}
-
-static void draw_logo(unsigned int startx, unsigned int starty)
-{
-	unsigned int x;
-	unsigned int y;
-	unsigned int byte;
-	unsigned int rowbytes;
-
-	rowbytes = (helenos_width - 1) / 8 + 1;
-
-	for (y = 0; y < helenos_height; y++)
-		for (x = 0; x < helenos_width; x++) {
-			byte = helenos_bits[rowbytes * y + x / 8];
-			byte >>= x % 8;
-			if (byte & 1)
-				putpixel(startx + x, starty + y,
-				    COLOR(LOGOCOLOR));
-		}
-}
-
-/***************************************************************/
-/* Stdout specific functions */
-
-static void invert_cursor(void)
-{
-	invert_char(position % columns, position / columns);
-}
+	}
+	
+	memcpy(backbuf, backbuf + cols, cols * (rows - 1));
+	memsetb(&backbuf[BB_POS(0, rows - 1)], cols, 0);
+}
+
+
+static void cursor_put(void)
+{
+	draw_glyph(CURSOR, position % cols, position / cols);
+}
+
+
+static void cursor_remove(void)
+{
+	draw_glyph(0, position % cols, position / cols);
+}
+
 
 /** Print character to screen
  *
- *  Emulate basic terminal commands
+ * Emulate basic terminal commands.
+ *
  */
 static void fb_putchar(chardev_t *dev, char ch)
@@ -402,35 +253,35 @@
 	switch (ch) {
 	case '\n':
-		invert_cursor();
-		position += columns;
-		position -= position % columns;
+		cursor_remove();
+		position += cols;
+		position -= position % cols;
 		break;
 	case '\r':
-		invert_cursor();
-		position -= position % columns;
+		cursor_remove();
+		position -= position % cols;
 		break;
 	case '\b':
-		invert_cursor();
-		if (position % columns)
+		cursor_remove();
+		if (position % cols)
 			position--;
 		break;
 	case '\t':
-		invert_cursor();
+		cursor_remove();
 		do {
-			draw_char(' ');
+			draw_glyph((uint8_t) ' ', position % cols, position / cols);
 			position++;
-		} while ((position % 8) && position < columns * rows);
+		} while ((position % 8) && (position < cols * rows));
 		break;
 	default:
-		draw_char(ch);
+		draw_glyph((uint8_t) ch, position % cols, position / cols);
 		position++;
 	}
 	
-	if (position >= columns * rows) {
-		position -= columns;
+	if (position >= cols * rows) {
+		position -= cols;
 		scroll_screen();
 	}
 	
-	invert_cursor();
+	cursor_put();
 	
 	spinlock_unlock(&fb_lock);
@@ -443,7 +294,84 @@
 
 
+/** Render glyphs
+ *
+ * Convert glyphs from device independent font
+ * description to current visual representation.
+ *
+ */
+static void render_glyphs(void)
+{
+	unsigned int glyph;
+	
+	for (glyph = 0; glyph < FONT_GLYPHS; glyph++) {
+		unsigned int y;
+		
+		for (y = 0; y < FONT_SCANLINES; y++) {
+			unsigned int x;
+			
+			for (x = 0; x < FONT_WIDTH; x++)
+				rgb_conv(&glyphs[GLYPH_POS(glyph, y) + x * pixelbytes],
+				    (fb_font[glyph * FONT_SCANLINES + y] & (1 << (7 - x))) ? FG_COLOR : BG_COLOR);
+		}
+	}
+	
+	rgb_conv(bgpixel, BG_COLOR);
+}
+
+
+/** Refresh the screen
+ *
+ */
+void fb_redraw(void)
+{
+	unsigned int row;
+	
+	for (row = 0; row < rows; row++) {
+		unsigned int y = ROW2Y(row);
+		unsigned int yd;
+		
+		for (yd = 0; yd < FONT_SCANLINES; yd++) {
+			unsigned int x;
+			unsigned int col;
+			
+			for (col = 0, x = 0; col < cols; col++, x += FONT_WIDTH)
+				memcpy(&fb_addr[FB_POS(x, y + yd)],
+			    &glyphs[GLYPH_POS(backbuf[BB_POS(col, row)], yd)],
+			    glyphscanline);
+		}
+	}
+	
+	if (COL2X(cols) < xres) {
+		unsigned int y;
+		
+		for (y = 0; y < yres; y++) {
+			unsigned int x;
+			
+			for (x = COL2X(cols); x < xres; x++)
+				memcpy(&fb_addr[FB_POS(x, y)], bgpixel, pixelbytes);
+		}
+	}
+	
+	if (ROW2Y(rows) < yres) {
+		unsigned int y;
+		
+		for (y = ROW2Y(rows); y < yres; y++) {
+			unsigned int x;
+			
+			for (x = 0; x < xres; x++)
+				memcpy(&fb_addr[FB_POS(x, y)], bgpixel, pixelbytes);
+		}
+	}
+}
+
+
 /** Initialize framebuffer as a chardev output device
  *
- * @param props  	Properties of the framebuffer device.
+ * @param addr   Physical address of the framebuffer
+ * @param x      Screen width in pixels
+ * @param y      Screen height in pixels
+ * @param scan   Bytes per one scanline
+ * @param visual Color model
+ *
  */
 void fb_init(fb_properties_t *props)
@@ -451,36 +379,29 @@
 	switch (props->visual) {
 	case VISUAL_INDIRECT_8:
-		rgb2scr = rgb_byte8;
-		scr2rgb = byte8_rgb;
+		rgb_conv = rgb_323;
 		pixelbytes = 1;
 		break;
 	case VISUAL_RGB_5_5_5:
-		rgb2scr = rgb_byte555;
-		scr2rgb = byte555_rgb;
+		rgb_conv = rgb_555;
 		pixelbytes = 2;
 		break;
 	case VISUAL_RGB_5_6_5:
-		rgb2scr = rgb_byte565;
-		scr2rgb = byte565_rgb;
+		rgb_conv = rgb_565;
 		pixelbytes = 2;
 		break;
 	case VISUAL_RGB_8_8_8:
-		rgb2scr = rgb_byte888;
-		scr2rgb = byte888_rgb;
+		rgb_conv = rgb_888;
 		pixelbytes = 3;
 		break;
 	case VISUAL_RGB_8_8_8_0:
-		rgb2scr = rgb_byte888;
-		scr2rgb = byte888_rgb;
+		rgb_conv = rgb_888;
 		pixelbytes = 4;
 		break;
 	case VISUAL_RGB_0_8_8_8:
-		rgb2scr = rgb_byte0888;
-		scr2rgb = byte0888_rgb;
+		rgb_conv = rgb_0888;
 		pixelbytes = 4;
 		break;
 	case VISUAL_BGR_0_8_8_8:
-		rgb2scr = bgr_byte0888;
-		scr2rgb = byte0888_bgr;
+		rgb_conv = bgr_0888;
 		pixelbytes = 4;
 		break;
@@ -488,11 +409,4 @@
 		panic("Unsupported visual.\n");
 	}
-	
-	unsigned int fbsize = props->scan * props->y;
-	
-	/* Map the framebuffer */
-	fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr,
-		fbsize + props->offset);
-	fbaddress += props->offset;
 	
 	xres = props->x;
@@ -500,47 +414,50 @@
 	scanline = props->scan;
 	
-	rows = props->y / FONT_SCANLINES;
-	columns = props->x / COL_WIDTH;
-
+	cols = xres / FONT_WIDTH;
+	rows = yres / FONT_SCANLINES;
+	
+	glyphscanline = FONT_WIDTH * pixelbytes;
+	glyphbytes = glyphscanline * FONT_SCANLINES;
+	
+	unsigned int fbsize = scanline * yres;
+	unsigned int bbsize = cols * rows;
+	unsigned int glyphsize = FONT_GLYPHS * glyphbytes;
+	
+	backbuf = (uint8_t *) malloc(bbsize, 0);
+	if (!backbuf)
+		panic("Unable to allocate backbuffer.\n");
+	
+	glyphs = (uint8_t *) malloc(glyphsize, 0);
+	if (!glyphs)
+		panic("Unable to allocate glyphs.\n");
+	
+	bgpixel = malloc(pixelbytes, 0);
+	if (!bgpixel)
+		panic("Unable to allocate background pixel.\n");
+	
+	memsetb(backbuf, bbsize, 0);
+	memsetb(glyphs, glyphsize, 0);
+	memsetb(bgpixel, pixelbytes, 0);
+	
+	render_glyphs();
+	
+	fb_addr = (uint8_t *) hw_map((uintptr_t) props->addr, fbsize);
+	
 	fb_parea.pbase = (uintptr_t) props->addr + props->offset;
-	fb_parea.vbase = (uintptr_t) fbaddress;
+	fb_parea.vbase = (uintptr_t) fb_addr;
 	fb_parea.frames = SIZE2FRAMES(fbsize);
 	fb_parea.cacheable = false;
 	ddi_parea_register(&fb_parea);
-
+	
 	sysinfo_set_item_val("fb", NULL, true);
 	sysinfo_set_item_val("fb.kind", NULL, 1);
 	sysinfo_set_item_val("fb.width", NULL, xres);
 	sysinfo_set_item_val("fb.height", NULL, yres);
-	sysinfo_set_item_val("fb.scanline", NULL, props->scan);
+	sysinfo_set_item_val("fb.scanline", NULL, scanline);
 	sysinfo_set_item_val("fb.visual", NULL, props->visual);
 	sysinfo_set_item_val("fb.address.physical", NULL, props->addr);
-	sysinfo_set_item_val("fb.offset", NULL, props->offset);
-	sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors);
-
-	/* Allocate double buffer */
-	unsigned int order = fnzb(SIZE2FRAMES(fbsize) - 1) + 1;
-	dbbuffer = (uint8_t *) frame_alloc(order, FRAME_ATOMIC | FRAME_KA);
-	if (!dbbuffer)
-		printf("Failed to allocate scroll buffer.\n");
-	dboffset = 0;
-
-	/* Initialized blank line */
-	blankline = (uint8_t *) malloc(ROW_BYTES, FRAME_ATOMIC);
-	if (!blankline)
-		panic("Failed to allocate blank line for framebuffer.");
-	unsigned int x, y;
-	for (y = 0; y < FONT_SCANLINES; y++)
-		for (x = 0; x < xres; x++)
-			(*rgb2scr)(&blankline[POINTPOS(x, y)], COLOR(BGCOLOR));
-	
-	clear_screen();
-
-	/* Update size of screen to match text area */
-	yres = rows * FONT_SCANLINES;
-
-	draw_logo(xres - helenos_width, 0);
-	invert_cursor();
-
+	
+	fb_redraw();
+	
 	chardev_initialize("fb", &framebuffer, &fb_ops);
 	stdout = &framebuffer;
Index: kernel/genarch/src/fb/font-8x16.c
===================================================================
--- kernel/genarch/src/fb/font-8x16.c	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/src/fb/font-8x16.c	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -35,5 +35,5 @@
 #include <genarch/fb/font-8x16.h>
 
-unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES] = {
+uint8_t fb_font[FONT_GLYPHS * FONT_SCANLINES] = {
 
 	/* 0 0x00 '^@' */
Index: kernel/genarch/src/fb/helenos.xbm
===================================================================
--- kernel/genarch/src/fb/helenos.xbm	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ 	(revision )
@@ -1,163 +1,0 @@
-#define helenos_width 127
-#define helenos_height 120
-static unsigned char helenos_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x80, 0x0f, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x80, 0x81,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
-   0x0f, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x06,
-   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07,
-   0x00, 0x00, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0c,
-   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
-   0x00, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
-   0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
-   0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
-   0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0xc1, 0x00, 0x00, 0x00,
-   0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x80,
-   0xc1, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfe, 0x01, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00,
-   0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
-   0x03, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xff, 0x07, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00,
-   0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
-   0x0c, 0x02, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xff, 0x0f, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00,
-   0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00,
-   0x18, 0x0c, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
-   0xfc, 0x1f, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00,
-   0x80, 0x1f, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00,
-   0x18, 0x02, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00,
-   0x30, 0x18, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00,
-   0xf8, 0x3f, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00,
-   0xe0, 0x7f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00,
-   0x38, 0x0c, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
-   0xe0, 0x20, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00,
-   0xf0, 0x7f, 0x00, 0x00, 0xc0, 0x78, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00,
-   0xe0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xc0, 0x7c, 0x00, 0x00,
-   0x70, 0x18, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x00, 0x00,
-   0x80, 0xfd, 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00,
-   0xfc, 0xff, 0x01, 0x00, 0x80, 0xf9, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,
-   0xc0, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x80, 0xfb, 0x00, 0x00,
-   0xc0, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03, 0x00,
-   0x00, 0xf3, 0x01, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x03, 0xfc,
-   0xff, 0xff, 0x03, 0x00, 0x00, 0xf3, 0x01, 0x00, 0xc0, 0x7f, 0x00, 0x00,
-   0x80, 0xff, 0x07, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf6, 0x03, 0x00,
-   0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0xe7, 0xff, 0xff, 0xff, 0x07, 0x00,
-   0x00, 0xe6, 0x03, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0x07, 0x00, 0x00, 0xec, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00,
-   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xcc, 0x07, 0x00,
-   0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0x0f, 0x00,
-   0x00, 0xdc, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff,
-   0x1f, 0xfe, 0x0f, 0x00, 0x00, 0xd8, 0x0f, 0x00, 0x00, 0xfe, 0x03, 0x00,
-   0x00, 0xfc, 0xff, 0xff, 0x03, 0xfe, 0x1f, 0x00, 0x00, 0x98, 0x0f, 0x00,
-   0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfc, 0x1f, 0x00,
-   0x00, 0xb0, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x1f,
-   0x00, 0xfc, 0x3f, 0x00, 0x00, 0x30, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00,
-   0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x70, 0x1f, 0x00,
-   0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xf8, 0x7f, 0x00,
-   0x00, 0x60, 0x3e, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x7f, 0x00,
-   0x00, 0xf8, 0x7f, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0xf8, 0x0f, 0x00,
-   0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x7e, 0x00,
-   0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00,
-   0x00, 0xfc, 0x7c, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0x00,
-   0x00, 0xf0, 0xff, 0x00, 0x00, 0xfe, 0xfd, 0x00, 0x00, 0xf0, 0x1f, 0x00,
-   0x00, 0xe0, 0xff, 0x01, 0x00, 0xe0, 0xff, 0x00, 0x80, 0xff, 0xf9, 0x00,
-   0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0xe0, 0xff, 0x00,
-   0xc0, 0xff, 0xfb, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x03,
-   0x00, 0xc0, 0x7f, 0x00, 0xe0, 0xff, 0xfb, 0x01, 0x00, 0xc0, 0x7f, 0x00,
-   0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0x7f, 0x00, 0xf8, 0xff, 0xf7, 0x01,
-   0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x80, 0x3f, 0x00,
-   0xfc, 0xff, 0xf7, 0x03, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x07,
-   0x00, 0x00, 0x00, 0x00, 0xfe, 0xef, 0xe7, 0x03, 0x00, 0x80, 0xff, 0x00,
-   0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, 0xdf, 0xef, 0x07,
-   0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xc0,
-   0xff, 0xdf, 0xef, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x0f,
-   0x00, 0x00, 0x00, 0xe0, 0xff, 0xcf, 0xcf, 0x07, 0x00, 0x00, 0xff, 0x01,
-   0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xc3, 0xcf, 0x0f,
-   0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xfc,
-   0xff, 0xe0, 0xcf, 0x0f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0x1f,
-   0x00, 0x00, 0x00, 0xfe, 0xff, 0xf9, 0xc7, 0x0f, 0x00, 0x00, 0xfe, 0x03,
-   0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe7, 0x0f,
-   0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0xff,
-   0xff, 0xff, 0xe7, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x07,
-   0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xe3, 0x0f, 0x00, 0x00, 0xfc, 0x0f,
-   0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xf1, 0x0f,
-   0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
-   0xff, 0xff, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0x0f, 0x00, 0x00, 0xf0, 0x1f,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0xfe, 0x0f,
-   0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
-   0xff, 0x81, 0xff, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xe0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x3f,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0xfc, 0xff, 0x07,
-   0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff,
-   0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xfe, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x7f,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x00,
-   0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xc0,
-   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00,
-   0xe0, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x80, 0xdf,
-   0x00, 0x3c, 0x00, 0x00, 0xf0, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x0f, 0x00,
-   0x00, 0x00, 0x00, 0xcf, 0x00, 0x7e, 0x00, 0x00, 0xfc, 0x7f, 0xc0, 0xff,
-   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x01, 0x7e, 0x00, 0x00,
-   0xfe, 0x0f, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97,
-   0x01, 0x3e, 0x00, 0x00, 0xff, 0x03, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0xc0, 0x7f, 0xc0, 0xff, 0xff,
-   0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x03, 0x00, 0x00, 0xe0,
-   0x0f, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,
-   0x03, 0x00, 0x00, 0xf8, 0x01, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x7c, 0x06, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0xff, 0xff,
-   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x0e, 0x00, 0xe0, 0x0f,
-   0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
-   0x3c, 0x00, 0xfc, 0x01, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xf8, 0x78, 0x80, 0x3f, 0xe0, 0xff, 0xff, 0xff, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe1, 0xff, 0x07, 0xfc,
-   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
-   0x81, 0xff, 0x80, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0xfe, 0xff,
-   0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
-   0x0f, 0x00, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xc0, 0x3f, 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff,
-   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
-   0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1f,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xf0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
Index: kernel/genarch/src/mm/asid.c
===================================================================
--- kernel/genarch/src/mm/asid.c	(revision 27e291609fe207cd6350a016713df0c547720247)
+++ kernel/genarch/src/mm/asid.c	(revision 76fca318d723e24d0c79dc1a99d87b0b03dee0f1)
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	ASID management.
+ * @brief ASID management.
  *
  * Modern processor architectures optimize TLB utilization
