Index: kernel/arch/amd64/include/mm/tlb.h
===================================================================
--- kernel/arch/amd64/include/mm/tlb.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/amd64/include/mm/tlb.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -36,7 +36,4 @@
 #define KERN_amd64_TLB_H_
 
-#define tlb_arch_init()
-#define tlb_print()
-
 #endif
 
Index: kernel/arch/amd64/src/mm/page.c
===================================================================
--- kernel/arch/amd64/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/amd64/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -35,4 +35,6 @@
 #include <arch/mm/page.h>
 #include <genarch/mm/page_pt.h>
+#include <genarch/drivers/ega/ega.h>
+#include <genarch/drivers/legacy/ia32/io.h>
 #include <arch/mm/frame.h>
 #include <mm/page.h>
@@ -47,4 +49,9 @@
 #include <panic.h>
 #include <align.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
+static parea_t ega_area;
 
 /* Definitions for identity page mapper */
@@ -215,8 +222,13 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
-{
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0xfffffffffffff - end_frame);
+void hw_area(void)
+{
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0xfffffffffffff - end_frame);
+	ddi_parea_register(&dev_area);
+	
+	ega_area.pbase = EGA_VIDEORAM;
+	ega_area.frames = SIZE2FRAMES(EGA_VRAM_SIZE);
+	ddi_parea_register(&ega_area);
 }
 
Index: kernel/arch/arm32/include/mm/tlb.h
===================================================================
--- kernel/arch/arm32/include/mm/tlb.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/arm32/include/mm/tlb.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -37,7 +37,4 @@
 #define KERN_arm32_TLB_H_
 
-#define tlb_arch_init()
-#define tlb_print()
-
 #endif
 
Index: kernel/arch/arm32/src/mm/page.c
===================================================================
--- kernel/arch/arm32/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/arm32/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -44,4 +44,8 @@
 #include <interrupt.h>
 #include <arch/mm/frame.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
 
 /** Initializes page tables.
@@ -107,8 +111,9 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
+void hw_area(void)
 {
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0xffffffff - end_frame);
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
+	ddi_parea_register(&dev_area);
 }
 
Index: kernel/arch/arm32/src/mm/tlb.c
===================================================================
--- kernel/arch/arm32/src/mm/tlb.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/arm32/src/mm/tlb.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -90,4 +90,12 @@
 }
 
+void tlb_arch_init(void)
+{
+}
+
+void tlb_print(void)
+{
+}
+
 /** @}
  */
Index: kernel/arch/ia32/include/mm/tlb.h
===================================================================
--- kernel/arch/ia32/include/mm/tlb.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ia32/include/mm/tlb.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia32mm	
+/** @addtogroup ia32mm
  * @{
  */
@@ -36,7 +36,4 @@
 #define KERN_ia32_TLB_H_
 
-#define tlb_arch_init()
-#define tlb_print()
-
 #endif
 
Index: kernel/arch/ia32/src/mm/page.c
===================================================================
--- kernel/arch/ia32/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ia32/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -35,4 +35,6 @@
 #include <arch/mm/page.h>
 #include <genarch/mm/page_pt.h>
+#include <genarch/drivers/ega/ega.h>
+#include <genarch/drivers/legacy/ia32/io.h>
 #include <arch/mm/frame.h>
 #include <mm/frame.h>
@@ -49,4 +51,9 @@
 #include <print.h>
 #include <interrupt.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
+static parea_t ega_area;
 
 void page_arch_init(void)
@@ -94,8 +101,13 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
+void hw_area(void)
 {
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0xffffffff - end_frame);
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
+	ddi_parea_register(&dev_area);
+	
+	ega_area.pbase = EGA_VIDEORAM;
+	ega_area.frames = SIZE2FRAMES(EGA_VRAM_SIZE);
+	ddi_parea_register(&ega_area);
 }
 
Index: kernel/arch/ia32/src/mm/tlb.c
===================================================================
--- kernel/arch/ia32/src/mm/tlb.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ia32/src/mm/tlb.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -68,4 +68,12 @@
 }
 
+void tlb_arch_init(void)
+{
+}
+
+void tlb_print(void)
+{
+}
+
 /** @}
  */
Index: kernel/arch/ia64/include/mm/tlb.h
===================================================================
--- kernel/arch/ia64/include/mm/tlb.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ia64/include/mm/tlb.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -35,7 +35,4 @@
 #ifndef KERN_ia64_TLB_H_
 #define KERN_ia64_TLB_H_
-
-#define tlb_arch_init()
-#define tlb_print()
 
 #include <arch/mm/page.h>
Index: kernel/arch/ia64/src/mm/page.c
===================================================================
--- kernel/arch/ia64/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ia64/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup ia64mm	
+/** @addtogroup ia64mm
  * @{
  */
@@ -49,4 +49,8 @@
 #include <memstr.h>
 #include <align.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
 
 static void set_environment(void);
@@ -275,8 +279,9 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
-{
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0x7fffffffffffffffUL - end_frame);
+void hw_area(void)
+{
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0x7fffffffffffffffUL - end_frame);
+	ddi_parea_register(&dev_area);
 }
 
Index: kernel/arch/ia64/src/mm/tlb.c
===================================================================
--- kernel/arch/ia64/src/mm/tlb.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ia64/src/mm/tlb.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -750,4 +750,12 @@
 }
 
+void tlb_arch_init(void)
+{
+}
+
+void tlb_print(void)
+{
+}
+
 /** @}
  */
Index: kernel/arch/mips32/src/mm/page.c
===================================================================
--- kernel/arch/mips32/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/mips32/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -37,4 +37,8 @@
 #include <mm/page.h>
 #include <mm/frame.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
 
 void page_arch_init(void)
@@ -52,8 +56,9 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
+void hw_area(void)
 {
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0xffffffff - end_frame);
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
+	ddi_parea_register(&dev_area);
 }
 
Index: kernel/arch/ppc32/src/mm/page.c
===================================================================
--- kernel/arch/ppc32/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/ppc32/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -38,4 +38,8 @@
 #include <align.h>
 #include <config.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
 
 void page_arch_init(void)
@@ -64,8 +68,9 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
+void hw_area(void)
 {
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0xffffffff - end_frame);
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
+	ddi_parea_register(&dev_area);
 }
 
Index: kernel/arch/sparc64/src/mm/page.c
===================================================================
--- kernel/arch/sparc64/src/mm/page.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/arch/sparc64/src/mm/page.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
@@ -42,4 +42,8 @@
 #include <align.h>
 #include <config.h>
+#include <ddi/ddi.h>
+
+/** Physical memory area for devices. */
+static parea_t dev_area;
 
 #ifdef CONFIG_SMP
@@ -165,8 +169,9 @@
 }
 
-void hw_area(uintptr_t *physaddr, pfn_t *frames)
+void hw_area(void)
 {
-	*physaddr = end_frame;
-	*frames = ADDR2PFN(0x7ffffffffff - end_frame);
+	dev_area.pbase = end_frame;
+	dev_area.frames = SIZE2FRAMES(0x7ffffffffff - end_frame);
+	ddi_parea_register(&dev_area);
 }
 
Index: kernel/genarch/include/drivers/ega/ega.h
===================================================================
--- kernel/genarch/include/drivers/ega/ega.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/genarch/include/drivers/ega/ega.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch_drivers	
+/** @addtogroup genarch_drivers
  * @{
  */
@@ -38,11 +38,12 @@
 #include <arch/types.h>
 
-#define ROW		80
-#define ROWS		25
-#define SCREEN		(ROW * ROWS)
+#define EGA_COLS       80
+#define EGA_ROWS       25
+#define EGA_SCREEN     (EGA_COLS * EGA_ROWS)
+#define EGA_VRAM_SIZE  (2 * EGA_SCREEN)
 
 /* EGA device registers. */
-#define EGA_INDEX_REG	0
-#define EGA_DATA_REG	1
+#define EGA_INDEX_REG  0
+#define EGA_DATA_REG   1
 
 extern void ega_redraw(void);
Index: kernel/genarch/include/drivers/legacy/ia32/io.h
===================================================================
--- kernel/genarch/include/drivers/legacy/ia32/io.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/genarch/include/drivers/legacy/ia32/io.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -31,6 +31,6 @@
  */
 /** @file
- * @brief	This file contains definitions used by architectures with the
- * 		ia32 legacy I/O space (i.e. ia32, amd64 and ia64). 
+ * @brief This file contains definitions used by architectures with the
+ *        ia32 legacy I/O space (i.e. ia32, amd64 and ia64).
  */
 
@@ -40,10 +40,9 @@
 #include <arch/types.h>
 
-#define I8042_BASE	((ioport8_t *)0x60)
+#define I8042_BASE    ((ioport8_t *) 0x60)
+#define EGA_BASE      ((ioport8_t *) 0x3d4)
+#define NS16550_BASE  ((ioport8_t *) 0x3f8)
 
-#define EGA_VIDEORAM 	0xb8000
-#define EGA_BASE	((ioport8_t *)0x3d4)
-
-#define NS16550_BASE	((ioport8_t *)0x3f8)
+#define EGA_VIDEORAM  0xb8000
 
 #endif
Index: kernel/genarch/src/drivers/ega/ega.c
===================================================================
--- kernel/genarch/src/drivers/ega/ega.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/genarch/src/drivers/ega/ega.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch_drivers	
+/** @addtogroup genarch_drivers
  * @{
  */
@@ -68,14 +68,14 @@
 static void ega_check_cursor(void)
 {
-	if (ega_cursor < SCREEN)
+	if (ega_cursor < EGA_SCREEN)
 		return;
 
-	memmove((void *) videoram, (void *) (videoram + ROW * 2),
-	    (SCREEN - ROW) * 2);
-	memmove((void *) backbuf, (void *) (backbuf + ROW * 2),
-	    (SCREEN - ROW) * 2);
-	memsetw(videoram + (SCREEN - ROW) * 2, ROW, 0x0720);
-	memsetw(backbuf + (SCREEN - ROW) * 2, ROW, 0x0720);
-	ega_cursor = ega_cursor - ROW;
+	memmove((void *) videoram, (void *) (videoram + EGA_COLS * 2),
+	    (EGA_SCREEN - EGA_COLS) * 2);
+	memmove((void *) backbuf, (void *) (backbuf + EGA_COLS * 2),
+	    (EGA_SCREEN - EGA_COLS) * 2);
+	memsetw(videoram + (EGA_SCREEN - EGA_COLS) * 2, EGA_COLS, 0x0720);
+	memsetw(backbuf + (EGA_SCREEN - EGA_COLS) * 2, EGA_COLS, 0x0720);
+	ega_cursor = ega_cursor - EGA_COLS;
 }
 
@@ -85,5 +85,5 @@
 	pio_write_8(ega_base + EGA_DATA_REG, (uint8_t) ((ega_cursor >> 8) & 0xff));
 	pio_write_8(ega_base + EGA_INDEX_REG, 0xf);
-	pio_write_8(ega_base + EGA_DATA_REG, (uint8_t) (ega_cursor & 0xff));	
+	pio_write_8(ega_base + EGA_DATA_REG, (uint8_t) (ega_cursor & 0xff));
 }
 
@@ -105,5 +105,5 @@
 	switch (ch) {
 	case '\n':
-		ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW;
+		ega_cursor = (ega_cursor + EGA_COLS) - ega_cursor % EGA_COLS;
 		break;
 	case '\t':
@@ -111,5 +111,5 @@
 		break; 
 	case '\b':
-		if (ega_cursor % ROW)
+		if (ega_cursor % EGA_COLS)
 			ega_cursor--;
 		break;
@@ -134,16 +134,16 @@
 void ega_init(ioport8_t *base, uintptr_t videoram_phys)
 {
-	/* Initialize the software structure. */	
+	/* Initialize the software structure. */
 	ega_base = base;
 	
-	backbuf = (uint8_t *) malloc(SCREEN * 2, 0);
+	backbuf = (uint8_t *) malloc(EGA_VRAM_SIZE, 0);
 	if (!backbuf)
 		panic("Unable to allocate backbuffer.");
 	
-	videoram = (uint8_t *) hw_map(videoram_phys, SCREEN * 2);
+	videoram = (uint8_t *) hw_map(videoram_phys, EGA_VRAM_SIZE);
 	
 	/* Clear the screen and set the cursor position. */
-	memsetw(videoram, SCREEN, 0x0720);
-	memsetw(backbuf, SCREEN, 0x0720);
+	memsetw(videoram, EGA_SCREEN, 0x0720);
+	memsetw(backbuf, EGA_SCREEN, 0x0720);
 	ega_move_cursor();
 	
@@ -153,6 +153,6 @@
 	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.width", NULL, EGA_COLS);
+	sysinfo_set_item_val("fb.height", NULL, EGA_ROWS);
 	sysinfo_set_item_val("fb.blinking", NULL, true);
 	sysinfo_set_item_val("fb.address.physical", NULL, videoram_phys);
@@ -161,5 +161,5 @@
 void ega_redraw(void)
 {
-	memcpy(videoram, backbuf, SCREEN * 2);
+	memcpy(videoram, backbuf, EGA_VRAM_SIZE);
 	ega_move_cursor();
 }
Index: kernel/generic/include/mm/page.h
===================================================================
--- kernel/generic/include/mm/page.h	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/generic/include/mm/page.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -62,5 +62,5 @@
 
 extern uintptr_t hw_map(uintptr_t physaddr, size_t size);
-extern void hw_area(uintptr_t *physaddr, pfn_t *frames);
+extern void hw_area(void);
 
 #endif
Index: kernel/generic/src/ddi/ddi.c
===================================================================
--- kernel/generic/src/ddi/ddi.c	(revision 5c06c1c2c7f8ec08d0fbfca6238ce9e6285ef01c)
+++ kernel/generic/src/ddi/ddi.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
@@ -59,12 +59,8 @@
 static LIST_INITIALIZE(parea_head);
 
-/** Physical memory area for devices. */
-static parea_t dev_area;
-
 /** Initialize DDI. */
 void ddi_init(void)
 {
-	hw_area(&dev_area.pbase, &dev_area.frames);
-	ddi_parea_register(&dev_area);
+	hw_area();
 }
 
