PL080 cannot trigger interrupt correctly. Reproduce this problem in a simple way.
In the versatilpb board, the interrupt output of pl080 is connected to the 17th interrupt input of pl190.
By reading the status register of pl190, determined whether there is an interrupt generated for the corresponding input.
The basic address of pl080 is 0x10130000, and the basic address of pl190 is 0x10140000.
Read the value of the address through the qemu monitor.
Configuration
../configure --target-list=arm-softmmu --enable-debug
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 result correctly after fixed
(qemu) xp /1wx 0x10140008
10140008: 0x00020000
Signed-off-by: Tao Ding <dingtao0430@163.com>
---
hw/dma/pl080.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
index 3f8acb03de..0979a687aa 100644
--- a/hw/dma/pl080.c
+++ b/hw/dma/pl080.c
@@ -212,6 +212,7 @@ again:
if (--s->running)
s->running = 1;
}
+ pl080_update(s);
}
static uint64_t pl080_read(void *opaque, hwaddr offset,
--
2.43.0