qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-arm] [PATCH v1 1/1] arm_gic: Include the GIC ArchRev in the ICPIDR


From: Alistair Francis
Subject: [Qemu-arm] [PATCH v1 1/1] arm_gic: Include the GIC ArchRev in the ICPIDR2 register
Date: Fri, 8 Jan 2016 10:57:13 -0800

The ARM GIC documentation (page 4-119) describes that bits
7 to 4 of the ICPIDR2 register should include the GIC architecture
version. This patche ORs the version into the existing return value.

Signed-off-by: Alistair Francis <address@hidden>
Tested-by: Sören Brinkmann <address@hidden>
---

 hw/intc/arm_gic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 13e297d..f47d606 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -688,6 +688,10 @@ static uint32_t gic_dist_readb(void *opaque, hwaddr 
offset, MemTxAttrs attrs)
     } else /* offset >= 0xfe0 */ {
         if (offset & 3) {
             res = 0;
+        } else if (offset == 0xfe8 && s->revision != REV_11MPCORE &&
+                                      s->revision != REV_NVIC) {
+            /* ICPIDR2 includes the GICv1 or GICv2 version information */
+            res = gic_id[(offset - 0xfe0) >> 2] | (s->revision << 4);
         } else {
             res = gic_id[(offset - 0xfe0) >> 2];
         }
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]