From 9886a0345e450536434042d664c6dd78223a33e7 Mon Sep 17 00:00:00 2001 From: Christoph Borchert Date: Thu, 8 Sep 2016 10:35:33 +0200 Subject: [PATCH] bochs: fix segmentation fault in DMA controller Change-Id: I10c3e7e89d41abdcaea374ea01a2d1613d013e4c --- simulators/bochs/iodev/dma.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simulators/bochs/iodev/dma.cc b/simulators/bochs/iodev/dma.cc index a74200e9..7afc3dce 100644 --- a/simulators/bochs/iodev/dma.cc +++ b/simulators/bochs/iodev/dma.cc @@ -699,6 +699,10 @@ void bx_dma_c::raise_HLDA(void) // wait till they're unmasked return; } + if (!BX_DMA_THIS s[ma_sl].chan[channel].used) { + //BX_PANIC(("hlda: channel %d not connected to device", channel)); + return; + } //BX_DEBUG(("hlda: OK in response to DRQ(%u)", (unsigned) channel)); phy_addr = (BX_DMA_THIS s[ma_sl].chan[channel].page_reg << 16) |