From: <gerg@snapgear.com>
To: qemu-devel@nongnu.org, paul@codesourcery.com
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: [Qemu-devel] [PATCH] m68k: implmenent more ColdFire 5208 interrupt controller functionality
Date: Thu, 13 Sep 2012 16:31:57 +1000 [thread overview]
Message-ID: <1347517917-16644-1-git-send-email-gerg@snapgear.com> (raw)
From: Greg Ungerer <gerg@uclinux.org>
Implement the SIMR and CIMR registers of the 5208 interrupt controller.
These are used by modern versions of Linux running on ColdFire (not sure
of the exact version they were introduced, but they have been in for quite
a while now).
Without this change when attempting to run a linux-3.5 kernel you will
see:
qemu: hardware error: mcf_intc_write: Bad write offset 28
and execution will stop and dump out.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
hw/mcf_intc.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/hw/mcf_intc.c b/hw/mcf_intc.c
index cc1a5f3..1811d0d 100644
--- a/hw/mcf_intc.c
+++ b/hw/mcf_intc.c
@@ -102,6 +102,20 @@ static void mcf_intc_write(void *opaque, target_phys_addr_t addr,
case 0x0c:
s->imr = (s->imr & 0xffffffff00000000ull) | (uint32_t)val;
break;
+ case 0x1c:
+ if (val & 0x40) {
+ s->imr = 0xffffffffffffffffull;
+ } else {
+ s->imr |= (0x1ull << (val & 0x3f));
+ }
+ break;
+ case 0x1d:
+ if (val & 0x40) {
+ s->imr = 0ull;
+ } else {
+ s->imr &= ~(0x1ull << (val & 0x3f));
+ }
+ break;
default:
hw_error("mcf_intc_write: Bad write offset %d\n", offset);
break;
--
1.7.0.4
reply other threads:[~2012-09-13 6:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1347517917-16644-1-git-send-email-gerg@snapgear.com \
--to=gerg@snapgear.com \
--cc=gerg@uclinux.org \
--cc=paul@codesourcery.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).