Day99 - Linux DMA Engine Framework¶
Goal¶
Understand the overall architecture of the Linux DMA Engine Framework before learning individual DMA APIs and controller implementations.
The objective of this lab is to become familiar with:
- DMA subsystem organization
- DMA Engine Framework
- DMA controller drivers
- Public DMA Engine APIs
- Linux kernel source layout
No driver implementation is required in this lab.
Lab Environment¶
- Raspberry Pi 5
- Raspberry Pi OS (64-bit)
- Linux Kernel Source
- Terminal
Lab 1 - Explore DMA Controller Drivers¶
Objective¶
Explore the DMA controller drivers supported by Linux.
Procedure¶
List all DMA controller drivers.
Expected Observation¶
Examples:
Each driver corresponds to one hardware DMA controller implementation.
Lab 2 - Explore DMA Engine Users¶
Objective¶
Find kernel drivers that use the DMA Engine Framework.
Procedure¶
Search for DMA channel allocation.
Expected Observation¶
The API is used by many subsystems, including:
- SPI
- MMC
- UART
- IIO
- Media
- Audio
- Networking
This demonstrates that the DMA Engine Framework is shared across multiple client drivers.
Lab 3 - Explore Public DMA APIs¶
Objective¶
Locate the public DMA Engine interface.
Procedure¶
Open:
Locate the following objects:
Also locate common DMA Engine APIs.
Examples:
The purpose of this lab is only to recognize the available interfaces.
Lab 4 - Explore DMA Engine Framework¶
Objective¶
Locate the DMA Engine Framework implementation.
Procedure¶
Open:
Observe that this file implements the generic DMA Engine Framework rather than any hardware-specific controller.
Do not study the implementation details yet.
Lab 5 - Explore DMA Controller Drivers¶
Objective¶
Compare the DMA Engine Framework with hardware-specific implementations.
Procedure¶
Open one DMA controller driver.
Examples:
or
Observe that these drivers interact directly with DMA controller registers and hardware resources.
Unlike dmaengine.c, these files contain controller-specific implementations.
Summary¶
In this lab, we explored the overall organization of the Linux DMA subsystem.
The key takeaway is that Linux separates DMA support into three layers:
Client drivers interact only with the DMA Engine Framework.
The framework provides a common programming interface, while individual DMA controller drivers handle hardware-specific operations.
Future labs will gradually explore channel allocation, descriptors, transactions, callbacks, and DMA controller internals.