summary refs log tree commit diff stats
path: root/hw/intc/arm_gicv3_its_common.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-01-11 13:25:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-11 13:25:40 +0000
commitf1945632b43e36bd9f3e0c2feb0e5b152be7ed91 (patch)
treeb2d4f343b5fb3b850cd459827e4330ca79f37b64 /hw/intc/arm_gicv3_its_common.c
parent2eea841c11096e8dcc457b80e21f3fbdc32d2590 (diff)
downloadfocaccia-qemu-f1945632b43e36bd9f3e0c2feb0e5b152be7ed91.tar.gz
focaccia-qemu-f1945632b43e36bd9f3e0c2feb0e5b152be7ed91.zip
hw/intc/arm_gicv3: Make reserved register addresses RAZ/WI
The GICv3 specification says that reserved register addresses
should RAZ/WI. This means we need to return MEMTX_OK, not MEMTX_ERROR,
because now that we support generating external aborts the
latter will cause an abort on new board models.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1513183941-24300-2-git-send-email-peter.maydell@linaro.org
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Diffstat (limited to 'hw/intc/arm_gicv3_its_common.c')
-rw-r--r--hw/intc/arm_gicv3_its_common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c
index 2bd2f0f3c9..284c0a7584 100644
--- a/hw/intc/arm_gicv3_its_common.c
+++ b/hw/intc/arm_gicv3_its_common.c
@@ -67,7 +67,8 @@ static MemTxResult gicv3_its_trans_read(void *opaque, hwaddr offset,
                                         MemTxAttrs attrs)
 {
     qemu_log_mask(LOG_GUEST_ERROR, "ITS read at offset 0x%"PRIx64"\n", offset);
-    return MEMTX_ERROR;
+    *data = 0;
+    return MEMTX_OK;
 }
 
 static MemTxResult gicv3_its_trans_write(void *opaque, hwaddr offset,
@@ -82,15 +83,12 @@ static MemTxResult gicv3_its_trans_write(void *opaque, hwaddr offset,
         if (ret <= 0) {
             qemu_log_mask(LOG_GUEST_ERROR,
                           "ITS: Error sending MSI: %s\n", strerror(-ret));
-            return MEMTX_DECODE_ERROR;
         }
-
-        return MEMTX_OK;
     } else {
         qemu_log_mask(LOG_GUEST_ERROR,
                       "ITS write at bad offset 0x%"PRIx64"\n", offset);
-        return MEMTX_DECODE_ERROR;
     }
+    return MEMTX_OK;
 }
 
 static const MemoryRegionOps gicv3_its_trans_ops = {