Hello All,

This adds halt/restart support via a magic page. There is no real
standard way to do this for MIPS systems, a patch for the MIPS Qemu
kernels to add this support was also proposed.


Thiemo


Index: qemu-work/target-mips/helper.c
===================================================================
--- qemu-work.orig/target-mips/helper.c 2006-02-21 16:45:41.000000000 +0000
+++ qemu-work/target-mips/helper.c      2006-02-21 16:46:37.000000000 +0000
@@ -103,6 +103,19 @@
         *prot = PAGE_READ | PAGE_WRITE;
     } else if (address < 0xC0000000UL) {
         /* kseg1 */
+#ifndef CONFIG_USER_ONLY
+       /* Check magic system control page. */
+       switch (address) {
+       case 0xBFBF0000: /* restart */
+               qemu_system_reset_request();
+               break;
+       case 0xBFBF0004: /* halt */
+               qemu_system_shutdown_request();
+               break;
+       default:
+               break;
+       }
+#endif
         /* XXX: check supervisor mode */
         *physical = address - 0xA0000000UL;
         *prot = PAGE_READ | PAGE_WRITE;


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to