Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

The Linux DMA API: Coherent and Streaming Mappings Explained

The Linux DMA API exists because the address a device uses is not the address the CPU uses, and because on most embedded SoCs the CPU cache is not kept in step with device accesses. Coherent mappings ( dma_alloc_coherent() ) give you memory that both sides can read and write without explicit cache maintenance, and are meant for small, long-lived structures such as descriptor rings. Streaming…

The Linux DMA API provides a way for devices and CPUs to communicate without the CPU having to manage cache coherency. It does this by setting up valid DMA addresses for buffers and handling any necessary cache maintenance. Drivers should use the DMA API correctly to avoid corruption, especially on different hardware platforms.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Friday 21 August →