hw/intc/arm_gicv5: Fix value of the IRS_DEVARCH register
PATCH 1/1 hw/intc/arm_gicv5: Fix value of the IRS_DEVARCH register
The GICv5 spec says bits [31:21] of IRS_DEVARCH are 0x23b. We wrongly shifted it by 31 instead of 21, so guests read 0x80105a19 rather than 0x47705a19.
Fixes 22232793ecb8 ("hw/intc/arm_gicv5: Implement CoreSight ID registers")
Signed-off-by Zenghui Yu <[email protected]>
--- hw/intc/arm_gicv5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/arm_gicv5.c +1 -1
@@ -318,7 +318,7 @@ FIELD(ICSR, HM, 5, 1) FIELD(ICSR, PRIORITY, 11, 5) FIELD(ICSR, IAFFID, 32, 16) -#define IRS_DEVARCH_VALUE ((0x23b << 31) | (0x1 << 20) | 0x5a19) +#define IRS_DEVARCH_VALUE ((0x23b << 21) | (0x1 << 20) | 0x5a19)static uint32_t gicv5_idreg (int regoffset) {
Signature · 1 line
2.56.0
Quoted 9 lines · Zenghui Yu
The GICv5 spec says bits [31:21] of
IRS_DEVARCHare0x23b. We wrongly shifted it by 31 instead of 21, so guests read0x80105a19rather than0x47705a19.Fixes 22232793ecb8 ("hw/intc/arm_gicv5: Implement CoreSight ID registers")Signed-off-by Zenghui Yu <[email protected]>--- hw/intc/arm_gicv5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 7 lines · Zenghui Yu
The GICv5 spec says bits [31:21] of
IRS_DEVARCHare0x23b. We wrongly shifted it by 31 instead of 21, so guests read0x80105a19rather than0x47705a19.Fixes 22232793ecb8 ("hw/intc/arm_gicv5: Implement CoreSight ID registers")Signed-off-by Zenghui Yu <[email protected]>
Whoops; thanks for the patch, applied to target-arm.next.
-- PMM