All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Halt/restart support for MIPS
Date: Tue, 21 Feb 2006 19:35:31 +0000	[thread overview]
Message-ID: <20060221193531.GE4110@networkno.de> (raw)

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	other threads:[~2006-02-21 19:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060221193531.GE4110@networkno.de \
    --to=ths@networkno.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.