aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2015-06-19 23:43:24 +1000
committerPeter Maydell <peter.maydell@linaro.org>2015-06-22 14:43:25 +0100
commit8c52f0cbba76310ad626e54996dbce08c7a8a820 (patch)
treea284d17b18b21049fb6920eb50bb5bff47556042 /hw/m68k
parent0a3346f5dea0a679322df804e1e78d7c10d12a9f (diff)
downloadqemu-8c52f0cbba76310ad626e54996dbce08c7a8a820.zip
qemu-8c52f0cbba76310ad626e54996dbce08c7a8a820.tar.gz
qemu-8c52f0cbba76310ad626e54996dbce08c7a8a820.tar.bz2
m68k: implement more ColdFire 5208 interrupt controller functionality
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> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Laurent Vivier <laurent@vivier.eu> Message-id: 1434721406-25288-2-git-send-email-gerg@uclinux.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/m68k')
-rw-r--r--hw/m68k/mcf_intc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c
index 621423c..f13c7f3 100644
--- a/hw/m68k/mcf_intc.c
+++ b/hw/m68k/mcf_intc.c
@@ -102,6 +102,20 @@ static void mcf_intc_write(void *opaque, hwaddr addr,
case 0x0c:
s->imr = (s->imr & 0xffffffff00000000ull) | (uint32_t)val;
break;
+ case 0x1c:
+ if (val & 0x40) {
+ s->imr = ~0ull;
+ } 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;