qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] armv7-m exit, exception fixes and add MPU
@ 2015-10-09 13:28 Michael Davidsaver
  2015-10-09 13:28 ` [Qemu-devel] [PATCH 1/3] armv7-m: exit on external reset request Michael Davidsaver
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Michael Davidsaver @ 2015-10-09 13:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Crosthwaite, Michael Davidsaver

Please be aware that this work is based on my reading of ARM documentation, and hasn't yet been cross-checked with real hardware.  Patch #1 is (I think) fairly straightforward.  I'd like to get some comments on patches #2 and #3, which I don't consider ready for merge.

The first patch was previously sent on the thread "armv7-m: exit on external reset request", and included here with only a changed commit message.

I'm trying to add support for the MPU (PMSAv7) for cortex-m3 and cortex-m4.  In the process I found an issue with handling of exceptions other than IRQ.  In arm_v7m_cpu_do_interrupt() 'v7m.exception' is not being updated for UsageFault, SVC, and MemManage cases.  In the UsageFault case, the handler isn't invoked, and an invalid instruction is perpetually re-executed, resulting in a stuck state.

Patch #2 relaxes handling of mis-aligned handler functions (ie. missing '.thumb_func') to mirror what is already done on exception return.  While a guest_errors message will be helpful for people (like myself) who make this mistake, I'm not sure if automatically correcting the error is appropriate.

I'm having some difficulty in getting my test code loaded on a real cortex-m4 for a cross-check.  It may be some time before I succeed (might have to get a different board).  If anyone is interested in trying to do this test, please let me know as I'm happy to assist.

Michael Davidsaver (3):
  armv7-m: exit on external reset request
  armv7-m: fix non-IRQ exceptions
  armv7-m: add MPU to cortex-m3 and cortex-m4

 hw/arm/armv7m.c       |   8 ---
 hw/intc/armv7m_nvic.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++--
 target-arm/cpu-qom.h  |   4 ++
 target-arm/cpu.c      |  14 +++++
 target-arm/helper.c   |  34 +++++++++--
 5 files changed, 200 insertions(+), 20 deletions(-)

-- 
2.1.4

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

end of thread, other threads:[~2015-10-12  3:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-devel] [PATCH 1/3] armv7-m: exit on external reset request Michael Davidsaver
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

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).