diff options
author | Petr Pavlu <petr.pavlu@suse.com> | 2022-01-13 16:19:15 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-01-20 11:47:52 +0000 |
commit | a66a24585fae7036dc2f358c9addd1630be5c50c (patch) | |
tree | 898f89587faf760486ffe9e7eb396423924393fd /hw | |
parent | b1b87327a903e298b3b4c79da0beed31b57fb594 (diff) | |
download | qemu-a66a24585fae7036dc2f358c9addd1630be5c50c.zip qemu-a66a24585fae7036dc2f358c9addd1630be5c50c.tar.gz qemu-a66a24585fae7036dc2f358c9addd1630be5c50c.tar.bz2 |
hw/intc/arm_gic: Implement read of GICC_IIDR
Implement support for reading GICC_IIDR. This register is used by the
Linux kernel to recognize that GICv2 with GICC_APRn is present.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Message-id: 20220113151916.17978-2-ppavlu@suse.cz
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/intc/arm_gic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index a994b1f..0cd9cec 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -1662,6 +1662,15 @@ static MemTxResult gic_cpu_read(GICState *s, int cpu, int offset, } break; } + case 0xfc: + if (s->revision == REV_11MPCORE) { + /* Reserved on 11MPCore */ + *data = 0; + } else { + /* GICv1 or v2; Arm implementation */ + *data = (s->revision << 16) | 0x43b; + } + break; default: qemu_log_mask(LOG_GUEST_ERROR, "gic_cpu_read: Bad offset %x\n", (int)offset); |