qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] zynq: Request qemu reset when PSS_RESET_CTRL triggered.
@ 2014-02-03  4:33 Chris Johns
  2014-02-08 14:04 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Johns @ 2014-02-03  4:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chris Johns

If 1 is written to the SLCR's PSS_RESET_CTRL register request a qemu
reset.

The RTEMS BSPs use this bit and if -no-reboot is used qemu exits cleanly.

Signed-off-by: Chris Johns <chrisj@rtems.org>
---
 hw/misc/zynq_slcr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
index e42a5b0..f68a934 100644
--- a/hw/misc/zynq_slcr.c
+++ b/hw/misc/zynq_slcr.c
@@ -394,7 +394,11 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
         case 0x1B0 ... 0x1D8:
             s->misc[(offset - 0x1B0) / 4] = val;
             break;
-        case 0x200 ... 0x25C:
+        case 0x200:
+            if (val == 1) {
+                qemu_system_reset_request();
+            }
+        case 0x204 ... 0x25C:
             if (offset == 0x250) {
                 goto bad_reg;
             }
-- 
1.8.3.4 (Apple Git-47)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-08 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03  4:33 [Qemu-devel] [PATCH] zynq: Request qemu reset when PSS_RESET_CTRL triggered Chris Johns
2014-02-08 14:04 ` Peter Maydell
2014-02-08 14:06   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).