On 14/9/26 14:52, Mark Cave-Ayland wrote:
Whilst the DBDMA memory region is 4K in size, only the bottom 16 registers are
implemented in the Power Macintosh DBDMA controller. If an attempt is made to
access any unimplemented registers then an out-of-bounds array access occurs.
Rework the switch() statements in dbdma_read() and dbdma_write() to handle each
individual register access, as well as providing a safe default for all other
unimplemented registers.
Signed-off-by: Mark Cave-Ayland <[email protected]>
---
hw/misc/macio/mac_dbdma.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>