From: Michael Davidsaver <mdavidsaver@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Crosthwaite <crosthwaitepeter@gmail.com>,
Michael Davidsaver <mdavidsaver@gmail.com>
Subject: [Qemu-devel] [PATCH 1/3] armv7-m: exit on external reset request
Date: Fri, 9 Oct 2015 09:28:29 -0400 [thread overview]
Message-ID: <49239b8f661f21f4e947fdb9d0e93c02feb2972f.1444396783.git.mdavidsaver@gmail.com> (raw)
In-Reply-To: <cover.1444396783.git.mdavidsaver@gmail.com>
Implement the SYSRESETREQ bit of the AIRCR register
for armv7-m (ie. cortex-m3).
---
hw/intc/armv7m_nvic.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 3ec8408..a671d84 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -15,6 +15,7 @@
#include "hw/arm/arm.h"
#include "exec/address-spaces.h"
#include "gic_internal.h"
+#include "sysemu/sysemu.h"
typedef struct {
GICState gic;
@@ -348,10 +349,13 @@ static void nvic_writel(nvic_state *s, uint32_t offset, uint32_t value)
break;
case 0xd0c: /* Application Interrupt/Reset Control. */
if ((value >> 16) == 0x05fa) {
+ if (value & 4) {
+ qemu_system_reset_request();
+ }
if (value & 2) {
qemu_log_mask(LOG_UNIMP, "VECTCLRACTIVE unimplemented\n");
}
- if (value & 5) {
+ if (value & 1) {
qemu_log_mask(LOG_UNIMP, "AIRCR system reset unimplemented\n");
}
if (value & 0x700) {
--
2.1.4
next prev parent reply other threads:[~2015-10-09 13:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 13:28 [Qemu-devel] [PATCH 0/3] armv7-m exit, exception fixes and add MPU Michael Davidsaver
2015-10-09 13:28 ` Michael Davidsaver [this message]
2015-10-09 13:28 ` [Qemu-devel] [PATCH 2/3] armv7-m: fix non-IRQ exceptions Michael Davidsaver
2015-10-11 15:25 ` Peter Crosthwaite
2015-10-11 18:58 ` Michael Davidsaver
2015-10-11 19:00 ` Peter Maydell
2015-10-09 13:28 ` [Qemu-devel] [PATCH 3/3] armv7-m: add MPU to cortex-m3 and cortex-m4 Michael Davidsaver
2015-10-11 15:23 ` Peter Crosthwaite
2015-10-12 3:51 ` Michael Davidsaver
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=49239b8f661f21f4e947fdb9d0e93c02feb2972f.1444396783.git.mdavidsaver@gmail.com \
--to=mdavidsaver@gmail.com \
--cc=crosthwaitepeter@gmail.com \
--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).