ESP DMA fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2110 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
35f1df84b6
commit
3dc1cb3428
3
hw/esp.c
3
hw/esp.c
|
@ -206,7 +206,6 @@ static void esp_do_dma(ESPState *s)
|
||||||
{
|
{
|
||||||
uint32_t dmaptr, minlen, len, from, to;
|
uint32_t dmaptr, minlen, len, from, to;
|
||||||
int to_device;
|
int to_device;
|
||||||
dmaptr = iommu_translate(s->espdmaregs[1]);
|
|
||||||
to_device = (s->espdmaregs[0] & DMA_WRITE_MEM) == 0;
|
to_device = (s->espdmaregs[0] & DMA_WRITE_MEM) == 0;
|
||||||
from = s->espdmaregs[1];
|
from = s->espdmaregs[1];
|
||||||
minlen = s->dma_left;
|
minlen = s->dma_left;
|
||||||
|
@ -218,8 +217,8 @@ static void esp_do_dma(ESPState *s)
|
||||||
len = to - from;
|
len = to - from;
|
||||||
}
|
}
|
||||||
DPRINTF("DMA address p %08x v %08x len %08x, from %08x, to %08x\n", dmaptr, s->espdmaregs[1], len, from, to);
|
DPRINTF("DMA address p %08x v %08x len %08x, from %08x, to %08x\n", dmaptr, s->espdmaregs[1], len, from, to);
|
||||||
s->espdmaregs[1] += len;
|
|
||||||
if (s->do_cmd) {
|
if (s->do_cmd) {
|
||||||
|
s->espdmaregs[1] += len;
|
||||||
s->ti_size -= len;
|
s->ti_size -= len;
|
||||||
DPRINTF("command len %d + %d\n", s->cmdlen, len);
|
DPRINTF("command len %d + %d\n", s->cmdlen, len);
|
||||||
cpu_physical_memory_read(dmaptr, &s->cmdbuf[s->cmdlen], len);
|
cpu_physical_memory_read(dmaptr, &s->cmdbuf[s->cmdlen], len);
|
||||||
|
|
Loading…
Reference in a new issue