From: Tao Ding <[email protected]>
In the codepath in pl080_write() where we run the DMA engine
after a change in the channel configuration register, we were
missing a pl080_update() call, which meant that we weren't
raising any interrupts generated by that DMA transfer.
A repro case for this is to program the PL080 and then
check the interrupt status by looking at the PL190 status
register, since the PL080 interrupt output is connected
to input 17 of the PL190. We look at the register value via
the QEMU monitor:
Reproducer
./qemu-system-arm -M versatilepb -m 128M -nographic -S \
-device loader,addr=0x00000000,data=0x11223344,data-len=4 \
-device loader,addr=0x00001000,data=0x00000000,data-len=4 \
-device loader,addr=0x10130030,data=0x00000001,data-len=4 \
-device loader,addr=0x10130100,data=0x00000000,data-len=4 \
-device loader,addr=0x10130104,data=0x00001000,data-len=4 \
-device loader,addr=0x10130108,data=0x00000000,data-len=4 \
-device loader,addr=0x1013010C,data=0x9e4bf001,data-len=4 \
-device loader,addr=0x10130110,data=0x0000c001,data-len=4
Qemu monitor
(qemu) xp /1wx 0x10140008
10140008: 0x00000000
The correct result after this fix:
(qemu) xp /1wx 0x10140008
10140008: 0x00020000
Cc: [email protected]
Signed-off-by: Tao Ding <[email protected]>
Message-id:
7584486ba62bc6d767c0d132dc843067f8c5efff.1773301927.git.dingtao0...@163.com
Reviewed-by: Peter Maydell <[email protected]>
[PMM: Adjusted commit message]
Signed-off-by: Peter Maydell <[email protected]>
(cherry picked from commit b6e61d1cc3bfc9091ab83e25d9781a67ef9c86c1)
Signed-off-by: Michael Tokarev <[email protected]>
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
index ed79d331cc..477147281c 100644
--- a/hw/dma/pl080.c
+++ b/hw/dma/pl080.c
@@ -227,6 +227,7 @@ again:
if (--s->running)
s->running = 1;
}
+ pl080_update(s);
}
static uint64_t pl080_read(void *opaque, hwaddr offset,
--
2.47.3