Checked Register Access
Register access modes (ro/wo/rw) are declared in the header, and
kdality lint warns about a write to a read-only register (W003).
The compiler does not reject it yet.
KDAL (Kernel Device Abstraction Layer) is a hardware-agnostic, pluggable abstraction framework inside the Linux kernel that lets developers write portable device drivers and accelerator backends once and run them on any embedded platform.
Device driver development in embedded Linux is tightly coupled to specific SoCs, kernel versions, and vendor BSPs:
KDAL separates what a device looks like (registers, signals, capabilities) from how the driver behaves (event handlers). It introduces a domain-specific language (DSL) with two file types:
| File type | Extension | Purpose |
|---|---|---|
| Device Header | .kdh |
Declares registers, signals, power states, capabilities |
| Driver Code | .kdc |
Implements event handlers (probe, read, write, signal, power) |
The KDAL compiler (kdalc) reads the .kdc file and the headers it
imports and generates the module’s C. The generated module does not build
yet (open finding O7 in KDAL’s docs/open-findings-20261121.md).
Checked Register Access
Register access modes (ro/wo/rw) are declared in the header, and
kdality lint warns about a write to a read-only register (W003).
The compiler does not reject it yet.
Backend Agnostic
A design goal: one driver across QEMU, MMIO, platform devices, Device Tree and VirtIO. Today the example drivers use the QEMU backend.
Not Turing-Complete
No recursion, no heap, no pointers. Loop bounds should be constants (a bound that may not be one is warned about).
Full Toolchain
Compiler, CLI tool, VS Code extension, Vim plugin, standard library of 7 device headers, and CMake modules (7 installed).
The same diagram as KDAL’s README (key: Start here, Reading the
diagrams): green parts are built into kdal.ko, which CI loads and tests with its
KUnit suites; the user-space programs build, but CI does not run them
against the module.
| Platform | Architecture | Status |
|---|---|---|
| Linux (QEMU aarch64) | ARM64 | Primary target: module and KUnit in CI (Linux 6.18) |
| Linux (native x86_64) | x86_64 | Development host |
| Linux (RISC-V) | riscv64 | Host tools only (release archive); module not tested |
| macOS (Apple Silicon) | ARM64 | Toolchain only |
kdalc and kdality on your machine