From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FBdfy-0002ws-Nj for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:59:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FBdIa-00013D-VD for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:35:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBdHz-0000sa-57 for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:35:11 -0500 Received: from [193.7.176.20] (helo=bender.bawue.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FBdOI-0006Fd-Su for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:41:43 -0500 Received: from lagash (unknown [194.74.144.146]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bender.bawue.de (Postfix) with ESMTP id 738094412C for ; Tue, 21 Feb 2006 20:35:09 +0100 (MET) Received: from ths by lagash with local (Exim 4.60) (envelope-from ) id 1FBdIJ-0004uF-4R for qemu-devel@nongnu.org; Tue, 21 Feb 2006 19:35:31 +0000 Date: Tue, 21 Feb 2006 19:35:31 +0000 Message-ID: <20060221193531.GE4110@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline From: Thiemo Seufer Subject: [Qemu-devel] [PATCH] Halt/restart support for MIPS Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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;