dev-arm: Added VGIC GICV_IIDR response
authorAnouk Van Laer <anouk.vanlaer@arm.com>
Wed, 7 Nov 2018 14:04:47 +0000 (14:04 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 4 Jan 2019 13:24:40 +0000 (13:24 +0000)
Change-Id: I60e8eadbbbf07c0f8b726213fd580aeb0dd0e00b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15278
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/dev/arm/vgic.cc
src/dev/arm/vgic.hh

index 3e295828ced6c7cd1b1018d34ab63d6194bbf060..adb670b400363877cd8ed764aef8f1d0c941b6c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 ARM Limited
+ * Copyright (c) 2013,2018 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -47,9 +47,9 @@
 #include "mem/packet_access.hh"
 
 VGic::VGic(const Params *p)
-    : PioDevice(p), platform(p->platform), gic(p->gic), vcpuAddr(p->vcpu_addr),
-      hvAddr(p->hv_addr), pioDelay(p->pio_delay),
-      maintInt(p->ppint)
+    : PioDevice(p), gicvIIDR(p->gicv_iidr), platform(p->platform),
+      gic(p->gic), vcpuAddr(p->vcpu_addr), hvAddr(p->hv_addr),
+      pioDelay(p->pio_delay), maintInt(p->ppint)
 {
     for (int x = 0; x < VGIC_CPU_MAX; x++) {
         postVIntEvent[x] = new EventFunctionWrapper(
@@ -127,6 +127,9 @@ VGic::readVCpu(PacketPtr pkt)
                       lr->VirtualID, lr->CpuID, i, lr->EOI);
           }
       } break;
+      case GICV_IIDR:
+        pkt->setLE<uint32_t>(gicvIIDR);
+        break;
       default:
         panic("VGIC VCPU read of bad address %#x\n", daddr);
     }
index 40e42d4fa0ed237f14522c73036923383e488d19..872dfcf87f7a3fde226dd432ad598b61ceb87f19 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 ARM Limited
+ * Copyright (c) 2013,2018 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -103,6 +103,7 @@ class VGic : public PioDevice
 
     static const uint32_t LR_PENDING    = 1;
     static const uint32_t LR_ACTIVE     = 2;
+    const uint32_t gicvIIDR;
 
     /** Post interrupt to CPU */
     void processPostVIntEvent(uint32_t cpu);