From: Chris Johns <chrisj@rtems.org>
To: qemu-devel@nongnu.org
Cc: Chris Johns <chrisj@rtems.org>
Subject: [Qemu-devel] [PATCH] zynq: Request qemu reset when PSS_RESET_CTRL triggered.
Date: Mon, 3 Feb 2014 15:33:09 +1100 [thread overview]
Message-ID: <1391401989-52312-1-git-send-email-chrisj@rtems.org> (raw)
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)
next reply other threads:[~2014-02-03 4:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 4:33 Chris Johns [this message]
2014-02-08 14:04 ` [Qemu-devel] [PATCH] zynq: Request qemu reset when PSS_RESET_CTRL triggered Peter Maydell
2014-02-08 14:06 ` Peter Maydell
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=1391401989-52312-1-git-send-email-chrisj@rtems.org \
--to=chrisj@rtems.org \
--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 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).