hw/arm/smmuv3: Fix decoding of ID register range
PATCH 1/1 hw/arm/smmuv3: Fix decoding of ID register range
The SMMUv3 ID registers cover an area 0x30 bytes in size (12 registers, 4 bytes each). We were incorrectly decoding only the first 0x20 bytes.
Signed-off-by Peter Maydell <[email protected]>
--- hw/arm/smmuv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/smmuv3.c +1 -1
@@ -1232,7 +1232,7 @@ static MemTxResult smmu_readl(SMMUv3State *s, hwaddr offset, uint64_t *data, MemTxAttrs attrs) {switch (offset) { - case A_IDREGS ... A_IDREGS + 0x1f: + case A_IDREGS ... A_IDREGS + 0x2f: *data =smmuv3_idreg (offset -A_IDREGS );return MEMTX_OK ; case A_IDR0 ... A_IDR5:
Signature · 1 line
2.20.1
Hi Peter,
Quoted 5 lines · Peter Maydell
The SMMUv3 ID registers cover an area
0x30bytes in size (12 registers, 4 bytes each). We were incorrectly decoding only the first0x20bytes.Signed-off-by Peter Maydell <[email protected]>
Reviewed-by Eric Auger <[email protected]>
Thank you for the fix.
Eric
Quoted 18 lines
--- hw/arm/smmuv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/smmuv3.c +1
-1@@ -1232,7 +1232,7 @@ static MemTxResult smmu_readl(SMMUv3State *s, hwaddr offset, uint64_t *data, MemTxAttrs attrs) {switch (offset) { - case A_IDREGS ... A_IDREGS + 0x1f: + case A_IDREGS ... A_IDREGS + 0x2f: *data =smmuv3_idreg (offset -A_IDREGS );return MEMTX_OK ; case A_IDR0 ... A_IDR5: