Skip to contentSkip to conversation

xen/arm: GICv2 GICH_MISR Read-Only

PATCH In review Edgar E. Iglesias 3 participants 5 messages Apr 10, 2015 – Apr 15, 2015

lore
Share & tools
lore
#0 lore raw

cover xen/arm: GICv2 GICH_MISR Read-Only

From: "Edgar E. Iglesias" <[email protected]>

Hi,

Does any one know why we are writing to GICH_MISR? It is a Read-Only register in GICv2. This showed up as illegal accesses in my QEMU logs.

I suspect gic-hip04 needs a similar patch. Are there any specs for that GIC somewhere?

Cheers,
Edgar

Edgar E. Iglesias (1):
xen/arm: Don't write to GICH_MISR

 xen/arch/arm/gic-v2.c | 2 --
 1 file changed, 2 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 xen/arm: Don't write to GICH_MISR

From: "Edgar E. Iglesias" <[email protected]>

GICH_MISR is read-only in GICv2.

---
 xen/arch/arm/gic-v2.c | 2 --
 1 file changed, 2 deletions(-)
xen/arch/arm/gic-v2.c +0 -2
index cfefb39..1a639e0 100644
@@ -345,8 +345,6 @@ static void __cpuinit gicv2_hyp_init(void)
     vtr = readl_gich(GICH_VTR);
     nr_lrs  = (vtr & GICH_V2_VTR_NRLRGS) + 1;
     gicv2_info.nr_lrs = nr_lrs;
-
-    writel_gich(GICH_MISR_EOI, GICH_MISR);
 }
 
 static void __cpuinit gicv2_hyp_disable(void)
Signature · 1 line
1.9.1
#4 lore raw
In reply to Edgar E. Iglesias
Quoted 3 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Hi,

Hi Edgar,

Quoted 2 lines

Does any one know why we are writing to GICH_MISR? It is a Read-Only register in GICv2. This showed up as illegal accesses in my QEMU logs.

I think this is a misunderstanding of the spec at the time the GIC driver has been written. On real hardware the write access is ignored.

AFAICT, we don't even care to get a maintenance interrupt when one LR is asserting an EOI (assuming we think this bit was enabling the assertion).

Quoted 2 lines

I suspect gic-hip04 needs a similar patch. Are there any specs for that GIC somewhere?

This hardware is very similar to the GIC. A chinese spec has been sent on the ML a couple of months ago [1].

Although, the HIP 04 driver is not functional anymore as the maintainers
of this driver (from Huawei and in CC) didn't answer to previous change
to the common GIC code [2].

Regards,

[1] https://github.com/hisilicon/boards/tree/master/D01/docs

[2]
http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg03835.html

Signature · 1 line
Julien Grall