On 12/19/25 05:18, Philippe Mathieu-Daudé wrote:
The read/write handlers access array of 32-bit register by index:277 struct OpenEthState { .. 287 uint32_t regs[REG_MAX]; .. 291 }; 546 static uint64_t open_eth_reg_read(void *opaque, 547 hwaddr addr, unsigned int size) 548 { .. 551 OpenEthState *s = opaque; 552 unsigned idx = addr / 4; .. 559 v = s->regs[idx]; .. 563 return v; 564 } This is a 32-bit implementation. Make that explicit in the MemoryRegionOps structure (this doesn't change the maximum access size, which -- being unset -- is 64-bit). Move the structure just after the handlers to ease code review. Signed-off-by: Philippe Mathieu-Daudé<[email protected]> --- hw/net/opencores_eth.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
Reviewed-by: Richard Henderson <[email protected]> r~
