silicon atlasTHE HARDWARE REFERENCE
العربية
Reference/The whole system
Systems & I/O

DMA, MMIO & IOMMUs

A device accesses memory under a mapping and synchronization contract.

Giving a device a CPU pointer is not always giving it a usable bus address.
Buffer

Data with a managed lifetime.

LIVE EXPERIMENT

Find the bottleneck

Runs on your device
05001,0001,5002,0000.25141632GFLOP/sIntensity (FLOP / byte)
Ideal upper bound400 GFLOP/s
Limiting resourceMemory
Ridge point10 FLOP/B

Low arithmetic intensity hits the memory ceiling. More data reuse can move the workload toward the compute ceiling.

What this model includes

An ideal upper bound with fixed peak compute and bandwidth. Ignores latency, overhead, cache-level traffic, and instruction mix.

FOLLOW THE MECHANISM

What happens inside

1

Map the device view

DMA lets a device transfer data without the CPU copying each byte. The driver maps buffers into an address space the device can use. An IOMMU translates and restricts device-visible addresses. Physical, virtual, and DMA addresses may differ. MMIO maps device registers into the CPU’s address space.

2

Transfer ownership safely

A coherent DMA allocation and a streaming DMA mapping have different rules. Drivers may need cache maintenance and synchronization at ownership transitions. Descriptors, buffer lifetime, and completion must be coordinated. A memory barrier does not replace every required cache operation on a noncoherent platform.

PUT IT TO WORK

What this means for your code

Low-level engineer

Use the platform DMA API. Check masks, alignment, coherent versus streaming mappings, and unmap only after device use ends.

Software developer

Async I/O still has buffer lifetime and synchronization costs. Keep buffers alive until completion and avoid unnecessary staging copies.

GO TO THE SOURCE

Read the actual specifications

These references supply the underlying contracts and implementation details. The diagrams here are simplified teaching models.

Linux · DMA API guideLinux kernel documentation
Linux · Memory barriersLinux kernel documentation

Keep following the connection

Understood the idea? Keep a note of your progress.