From 272e4aa26d8c99ea2043a12e49ac25b2e81fc7ac Mon Sep 17 00:00:00 2001 From: Anouk Van Laer Date: Wed, 7 Nov 2018 14:04:47 +0000 Subject: [PATCH] dev-arm: Added VGIC GICV_IIDR response Change-Id: I60e8eadbbbf07c0f8b726213fd580aeb0dd0e00b Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-by: Anouk Van Laer Reviewed-on: https://gem5-review.googlesource.com/c/15278 Maintainer: Andreas Sandberg --- src/dev/arm/vgic.cc | 11 +++++++---- src/dev/arm/vgic.hh | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/dev/arm/vgic.cc b/src/dev/arm/vgic.cc index 3e295828c..adb670b40 100644 --- a/src/dev/arm/vgic.cc +++ b/src/dev/arm/vgic.cc @@ -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(gicvIIDR); + break; default: panic("VGIC VCPU read of bad address %#x\n", daddr); } diff --git a/src/dev/arm/vgic.hh b/src/dev/arm/vgic.hh index 40e42d4fa..872dfcf87 100644 --- a/src/dev/arm/vgic.hh +++ b/src/dev/arm/vgic.hh @@ -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); -- 2.30.2