The I2CD_CMD register now returns a valid value in old register mode.
Fixes: c2c5beec42bf ("hw/i2c/aspeed_i2c: Fix out-of-bounds read in I2C MMIO
handlers")
Signed-off-by: Timur Maksimov <[email protected]>
---
hw/i2c/aspeed_i2c.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index fb6d19c37b..ff6ef6d23a 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -108,6 +108,7 @@ static uint64_t aspeed_i2c_bus_old_read(AspeedI2CBus *bus,
hwaddr offset,
value = bus->regs[offset / sizeof(*bus->regs)];
break;
case A_I2CD_CMD:
+ value = bus->regs[offset / sizeof(*bus->regs)];
value = SHARED_FIELD_DP32(value, BUS_BUSY_STS, i2c_bus_busy(bus->bus));
break;
case A_I2CD_DMA_ADDR:
--
2.53.0