Hello,
I want to learn the implementation of simulation DMA, including the flow of DMA read/write.
The first step I tried is to learn it by debugging qemu-system-arm. The machine I used is raspi2. Bcm2835 DMA controller is initialed during booting, but I find that there are no other devices use DMA read or write during the booting. (I set breakpoint at dma_memory_rw() )Therefore, I have no idea how to observe the behavior of DMA read/write.
I have read the files under /hw/dma, but these files only describe DMA structure, they are not related to the behavior of DMA read/write. What I want to learn is how QEMU dispatch the DMA read/write(using other threads except cpu thread to do read/write?), and how to invoke guest CPU that the DMA read/write finish( send signal to main loop thread or CPU thread?).
As far as I know is that using DMA read/write will call function dma_memory_rw(). I don't know how to invoke DMA read/write in the guest application. Is there any way to invoke DMA in application? or any method that I can learn how DMA is simulated in QEMU?
Any advice is welcome. I will be grateful for any help.
Sincerely,
Eva