Index: kernel/arch/mips32/src/interrupt.c
===================================================================
--- kernel/arch/mips32/src/interrupt.c	(revision 68d873626159ee46816ad04fc6e4763eebe6eb12)
+++ kernel/arch/mips32/src/interrupt.c	(revision f5dd4a133e7e9ed5518c5ff4156b01af404e89be)
@@ -38,5 +38,4 @@
 #include <arch.h>
 #include <arch/cp0.h>
-#include <arch/smp/dorder.h>
 #include <time/clock.h>
 #include <ipc/sysipc.h>
@@ -45,14 +44,6 @@
 #define TIMER_IRQ   7
 
-#ifdef MACHINE_msim
-#define DORDER_IRQ  5
-#endif
-
 function virtual_timer_fnc = NULL;
 static irq_t timer_irq;
-
-#ifdef MACHINE_msim
-static irq_t dorder_irq;
-#endif
 
 // TODO: This is SMP unsafe!!!
@@ -156,16 +147,4 @@
 }
 
-#ifdef MACHINE_msim
-static irq_ownership_t dorder_claim(irq_t *irq)
-{
-	return IRQ_ACCEPT;
-}
-
-static void dorder_irq_handler(irq_t *irq)
-{
-	dorder_ipi_ack(1 << dorder_cpuid());
-}
-#endif
-
 /* Initialize basic tables for exception dispatching */
 void interrupt_init(void)
@@ -181,14 +160,4 @@
 	timer_start();
 	cp0_unmask_int(TIMER_IRQ);
-
-#ifdef MACHINE_msim
-	irq_initialize(&dorder_irq);
-	dorder_irq.inr = DORDER_IRQ;
-	dorder_irq.claim = dorder_claim;
-	dorder_irq.handler = dorder_irq_handler;
-	irq_register(&dorder_irq);
-
-	cp0_unmask_int(DORDER_IRQ);
-#endif
 }
 
Index: kernel/arch/mips32/src/mach/msim/dorder.c
===================================================================
--- kernel/arch/mips32/src/mach/msim/dorder.c	(revision f5dd4a133e7e9ed5518c5ff4156b01af404e89be)
+++ kernel/arch/mips32/src/mach/msim/dorder.c	(revision f5dd4a133e7e9ed5518c5ff4156b01af404e89be)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2007 Martin Decky
+ * 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.
+ */
+
+/** @addtogroup kernel_mips32
+ * @{
+ */
+/** @file
+ */
+
+#include <arch/mach/msim/dorder.h>
+#include <arch/mach/msim/msim.h>
+#include <stdint.h>
+#include <smp/ipi.h>
+#include <interrupt.h>
+
+static irq_t dorder_irq;
+
+#ifdef CONFIG_SMP
+
+void ipi_broadcast_arch(int ipi)
+{
+	*((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff;
+}
+
+#endif
+
+static irq_ownership_t dorder_claim(irq_t *irq)
+{
+	return IRQ_ACCEPT;
+}
+
+static void dorder_irq_handler(irq_t *irq)
+{
+	dorder_ipi_ack(1 << dorder_cpuid());
+}
+
+void dorder_init(void)
+{
+	irq_initialize(&dorder_irq);
+	dorder_irq.inr = MSIM_DORDER_IRQ;
+	dorder_irq.claim = dorder_claim;
+	dorder_irq.handler = dorder_irq_handler;
+	irq_register(&dorder_irq);
+
+	cp0_unmask_int(MSIM_DORDER_IRQ);
+}
+
+uint32_t dorder_cpuid(void)
+{
+	return *((volatile uint32_t *) MSIM_DORDER_ADDRESS);
+}
+
+void dorder_ipi_ack(uint32_t mask)
+{
+	*((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask;
+}
+
+/** @}
+ */
Index: kernel/arch/mips32/src/mach/msim/msim.c
===================================================================
--- kernel/arch/mips32/src/mach/msim/msim.c	(revision 68d873626159ee46816ad04fc6e4763eebe6eb12)
+++ kernel/arch/mips32/src/mach/msim/msim.c	(revision f5dd4a133e7e9ed5518c5ff4156b01af404e89be)
@@ -35,7 +35,7 @@
 
 #include <arch/mach/msim/msim.h>
+#include <arch/mach/msim/dorder.h>
 #include <console/console.h>
 #include <sysinfo/sysinfo.h>
-#include <arch/drivers/msim.h>
 #include <genarch/drivers/dsrln/dsrlnin.h>
 #include <genarch/drivers/dsrln/dsrlnout.h>
@@ -62,4 +62,5 @@
 void msim_init(void)
 {
+	dorder_init();
 	cp0_unmask_int(MSIM_DDISK_IRQ);
 }
Index: kernel/arch/mips32/src/mm/frame.c
===================================================================
--- kernel/arch/mips32/src/mm/frame.c	(revision 68d873626159ee46816ad04fc6e4763eebe6eb12)
+++ kernel/arch/mips32/src/mm/frame.c	(revision f5dd4a133e7e9ed5518c5ff4156b01af404e89be)
@@ -41,5 +41,5 @@
 #include <config.h>
 #ifdef MACHINE_msim
-#include <arch/drivers/msim.h>
+#include <arch/mach/msim/msim.h>
 #endif
 #include <arch/arch.h>
@@ -57,5 +57,5 @@
 
 #define ZERO_PAGE_VALUE_KSEG1(frame) \
-	(((volatile uint32_t *) (0xa0000000 + (frame << ZERO_PAGE_WIDTH)))[ZERO_PAGE_OFFSET])
+	(((volatile uint32_t *) PA2KSEG1(frame << ZERO_PAGE_WIDTH))[ZERO_PAGE_OFFSET])
 
 #define MAX_REGIONS  32
@@ -80,9 +80,9 @@
 #ifdef MACHINE_msim
 	/* MSIM device (dprinter) */
-	if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH))
+	if (frame == (KSEG12PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH))
 		return false;
 
 	/* MSIM device (dkeyboard) */
-	if (frame == (KA2PA(MSIM_KBD_ADDRESS) >> ZERO_PAGE_WIDTH))
+	if (frame == (KSEG12PA(MSIM_KBD_ADDRESS) >> ZERO_PAGE_WIDTH))
 		return false;
 #endif
Index: kernel/arch/mips32/src/smp/dorder.c
===================================================================
--- kernel/arch/mips32/src/smp/dorder.c	(revision 68d873626159ee46816ad04fc6e4763eebe6eb12)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Copyright (c) 2007 Martin Decky
- * 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.
- */
-
-/** @addtogroup kernel_mips32
- * @{
- */
-/** @file
- */
-
-#include <stdint.h>
-#include <smp/ipi.h>
-#include <arch/smp/dorder.h>
-
-#define MSIM_DORDER_ADDRESS  0xB0000100
-
-#ifdef CONFIG_SMP
-
-void ipi_broadcast_arch(int ipi)
-{
-	*((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff;
-}
-
-#endif
-
-uint32_t dorder_cpuid(void)
-{
-	return *((volatile uint32_t *) MSIM_DORDER_ADDRESS);
-}
-
-void dorder_ipi_ack(uint32_t mask)
-{
-	*((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask;
-}
-
-/** @}
- */
