qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Halt/restart support for MIPS


From: Thiemo Seufer
Subject: [Qemu-devel] [PATCH] Halt/restart support for MIPS
Date: Tue, 21 Feb 2006 19:35:31 +0000
User-agent: Mutt/1.5.11+cvs20060126

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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]