All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Halt/restart support for MIPS
@ 2006-02-21 19:35 Thiemo Seufer
  0 siblings, 0 replies; only message in thread
From: Thiemo Seufer @ 2006-02-21 19:35 UTC (permalink / raw)
  To: qemu-devel

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-21 19:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-21 19:35 [Qemu-devel] [PATCH] Halt/restart support for MIPS Thiemo Seufer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.