Index: arch/amd64/include/drivers/ega.h
===================================================================
--- arch/amd64/include/drivers/ega.h	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
+++ arch/amd64/include/drivers/ega.h	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -0,0 +1,1 @@
+../../../ia32/include/drivers/ega.h
Index: ch/amd64/include/ega.h
===================================================================
--- arch/amd64/include/ega.h	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../ia32/include/ega.h
Index: arch/amd64/src/amd64.c
===================================================================
--- arch/amd64/src/amd64.c	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ arch/amd64/src/amd64.c	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -34,5 +34,5 @@
 
 #include <proc/thread.h>
-#include <arch/ega.h>
+#include <arch/drivers/ega.h>
 #include <arch/vesa.h>
 #include <genarch/i8042/i8042.h>
Index: arch/ia32/include/drivers/ega.h
===================================================================
--- arch/ia32/include/drivers/ega.h	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
+++ arch/ia32/include/drivers/ega.h	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2001-2004 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.
+ */
+
+#ifndef __EGA_H__
+#define __EGA_H__
+
+#define VIDEORAM	0xb8000
+#define ROW		80
+#define ROWS		25
+#define SCREEN		(ROW * ROWS)
+
+extern void ega_init(void);
+
+#endif
Index: ch/ia32/include/ega.h
===================================================================
--- arch/ia32/include/ega.h	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
- * Copyright (C) 2001-2004 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.
- */
-
-#ifndef __EGA_H__
-#define __EGA_H__
-
-#define VIDEORAM	0xb8000
-#define ROW		80
-#define ROWS		25
-#define SCREEN		(ROW*ROWS)
-
-extern void ega_init(void);
-
-#endif
Index: arch/ia32/src/drivers/ega.c
===================================================================
--- arch/ia32/src/drivers/ega.c	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ arch/ia32/src/drivers/ega.c	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -27,5 +27,5 @@
  */
 
-#include <arch/ega.h>
+#include <arch/drivers/ega.h>
 #include <putchar.h>
 #include <mm/page.h>
@@ -38,4 +38,5 @@
 #include <console/chardev.h>
 #include <console/console.h>
+#include <sysinfo/sysinfo.h>
 
 /*
@@ -46,4 +47,5 @@
 SPINLOCK_INITIALIZE(egalock);
 static __u32 ega_cursor;
+static __u8 *videoram;
 
 static void ega_putchar(chardev_t *d, const char ch);
@@ -59,15 +61,21 @@
 {
 	__u8 hi, lo;
-
-	page_mapping_insert(AS_KERNEL, PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE);
-	outb(0x3d4,0xe);
+	
+	videoram = (__u8 *) hw_map(VIDEORAM, SCREEN * 2);
+	outb(0x3d4, 0xe);
 	hi = inb(0x3d5);
-	outb(0x3d4,0xf);
+	outb(0x3d4, 0xf);
 	lo = inb(0x3d5);
-	ega_cursor = (hi<<8)|lo;
+	ega_cursor = (hi << 8) | lo;
 
 	chardev_initialize("ega_out", &ega_console, &ega_ops);
 	stdout = &ega_console;
-
+	
+	sysinfo_set_item_val("fb", NULL, true);
+	sysinfo_set_item_val("fb.kind", NULL, 2);
+	sysinfo_set_item_val("fb.width", NULL, ROW);
+	sysinfo_set_item_val("fb.height", NULL, ROWS);
+	sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM);
+	
 #ifndef CONFIG_FB
 	putchar('\n');
@@ -77,7 +85,5 @@
 static void ega_display_char(char ch)
 {
-	__u8 *vram = (__u8 *) PA2KA(VIDEORAM);
-	
-	vram[ega_cursor*2] = ch;
+	videoram[ega_cursor * 2] = ch;
 }
 
@@ -90,6 +96,6 @@
 		return;
 
-	memcpy((void *)PA2KA(VIDEORAM), (void *)(PA2KA(VIDEORAM) + ROW*2), (SCREEN - ROW)*2);
-	memsetw(PA2KA(VIDEORAM) + (SCREEN - ROW)*2, ROW, 0x0720);
+	memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2);
+	memsetw((__address) (videoram + (SCREEN - ROW) * 2), ROW, 0x0720);
 	ega_cursor = ega_cursor - ROW;
 }
@@ -103,19 +109,19 @@
 
 	switch (ch) {
-	case '\n':
-		ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW;
-		break;
-	case '\t':
-		ega_cursor = (ega_cursor + 8) - ega_cursor % 8;
-		break; 
-	case '\b':
-		if (ega_cursor % ROW)
-			ega_cursor--;
-		break;
-	default:
-		ega_display_char(ch);
-		ega_cursor++;
-		break;
-        }
+		case '\n':
+			ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW;
+			break;
+		case '\t':
+			ega_cursor = (ega_cursor + 8) - ega_cursor % 8;
+			break; 
+		case '\b':
+			if (ega_cursor % ROW)
+				ega_cursor--;
+			break;
+		default:
+			ega_display_char(ch);
+			ega_cursor++;
+			break;
+	}
 	ega_check_cursor();
 	ega_move_cursor();
@@ -127,7 +133,7 @@
 void ega_move_cursor(void)
 {
-	outb(0x3d4,0xe);
-	outb(0x3d5,(ega_cursor>>8)&0xff);
-	outb(0x3d4,0xf);
-	outb(0x3d5,ega_cursor&0xff);	
+	outb(0x3d4, 0xe);
+	outb(0x3d5, (ega_cursor >> 8) & 0xff);
+	outb(0x3d4, 0xf);
+	outb(0x3d5, ega_cursor & 0xff);	
 }
Index: arch/ia32/src/drivers/vesa.c
===================================================================
--- arch/ia32/src/drivers/vesa.c	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ arch/ia32/src/drivers/vesa.c	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -42,5 +42,4 @@
 #include <memstr.h>
 #include <bitops.h>
-#include <sysinfo/sysinfo.h>
 
 __u32 vesa_ph_addr;
Index: arch/ia32/src/ia32.c
===================================================================
--- arch/ia32/src/ia32.c	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ arch/ia32/src/ia32.c	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -34,5 +34,5 @@
 #include <arch/pm.h>
 
-#include <arch/ega.h>
+#include <arch/drivers/ega.h>
 #include <arch/vesa.h>
 #include <genarch/i8042/i8042.h>
Index: genarch/src/fb/fb.c
===================================================================
--- genarch/src/fb/fb.c	(revision 39031ccf2e1d346ba441a3edb5a47b38c426d640)
+++ genarch/src/fb/fb.c	(revision 018f95aaadbfd191dea48069ab135be087e8c3e3)
@@ -369,4 +369,5 @@
 	
 	sysinfo_set_item_val("fb", NULL, true);
+	sysinfo_set_item_val("fb.kind", NULL, 1);
 	sysinfo_set_item_val("fb.width", NULL, x);
 	sysinfo_set_item_val("fb.height", NULL, y);
