a66a24585f (hw/intc/arm_gic: Implement read of GICC_IIDR) implemented
this for the CPU interface register. The fact we don't implement it
shows up when running Xen with -d guest_error which is definitely
wrong because the guest is perfectly entitled to read it.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- checkpatch fixes.
v3
- re-base on re-flow with if
v4
- fix the commit message
---
hw/intc/arm_gic.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 1a04144c38..7a34bc0998 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -973,8 +973,18 @@ static uint8_t gic_dist_readb(void *opaque, hwaddr offset,
MemTxAttrs attrs)
/* GICD_TYPER byte 1 */
return (s->security_extn << 2);
}
- if (offset < 0x08)
+ if (offset == 8) {
+ /* GICD_IIDR byte 0 */
+ return 0x3b; /* Arm JEP106 identity */
+ }
+ if (offset == 9) {
+ /* GICD_IIDR byte 1 */
+ return 0x04; /* Arm JEP106 identity */