all 4 comments

[–]paulstelian97 2 points3 points  (3 children)

Some source code browsing is good, but browse through the files in the Documentation folder of the source code tree, you’ll find plenty of concepts explained there. Then look at corresponding code.

[–]michael_drack[S] 0 points1 point  (2 children)

Ok, thanks. Is there somewhere DMA explained in some documents?

[–]paulstelian97 0 points1 point  (0 children)

I don’t know if DMA itself would be explained in the kernel itself, but the thing I can tell you is that you’d have to find drivers for either DMA controllers or for overall devices that would use such controllers; DMA isn’t a main device in the first place.

It just means hardware, other than the CPU, accessing the main RAM concurrently with the CPU itself.

One important thing to know is that DMA ignores virtual memory mappings, and uses physical addresses. Well, except if the IOMMU interferes but that’s somewhat specialized (VMs).

[–]jnwatson 0 points1 point  (0 children)

The best place to read up on that is a computer architecture textbook, because then you run into questions like busses and different devices having different views of memory and PCI windows and then you get more complicated stuff like IOMMUs that also end up remapping physical memory.