Region Ownership: Unifying the Priority-Ceiling Protocol and DMA Handshakes in a Bare-Metal Language

A compiler for a microcontroller normally models a single bus master: the CPU. But memory correctness on a modern MCU is a property of the whole system — CPU cores, DMA engines, caches, and the bus matrix that connects them. The resulting bugs are silent: a buffer placed in memory the DMA engine cannot reach, a cache line the DMA never sees, a descriptor armed before the CPU has finished writing it. We describe BML, a language and compiler (beemel) for ARM Cortex-M firmware, built around two ideas. First, every bus master is a first-class agent with its own reach, cache view, and permissions, and CPU/DMA memory sharing is checked at compile time. Second — our central claim — the CPU priority-ceiling protocol (mutual exclusion between interrupt and thread contexts) and the asynchronous DMA release/reclaim handshake are one concept, region ownership, with the synchronization mechanism derived from the set of sharers — the programmer declares the sharing and the ownership window, not which exclusion protocol to emit. The model was built failure-first: every check traces to a specific hardware bug we provoked on a development board, and the result was validated back on silicon across three DMA architectures (ST crossbar, RP2350 per-channel, nRF51 fixed-block). We position the work against the priority-ceiling literature (which covers the CPU half only) and the formal DMA-isolation and OS memory-model literature (which treats DMA but never unifies it with CPU-side mutual exclusion). These are compile-time analyses plus a test suite, not formal proofs; we are explicit about the resulting trust boundary.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-06-26
DOI
https://doi.org/10.5281/zenodo.20878733
Primary Topic
Security and Verification in Computing
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Region Ownership: Unifying the Priority-Ceiling Protocol and DMA Handshakes in a Bare-Metal Language

Daniel Tralamazza
Zenodo (CERN European Organization for Nuclear Research)
Security and Verification in Computing
preprint

Region Ownership: Unifying the Priority-Ceiling Protocol and DMA Handshakes in a Bare-Metal Language

Daniel Tralamazza
preprint en

Abstract

A compiler for a microcontroller normally models a single bus master: the CPU. But memory correctness on a modern MCU is a property of the whole system — CPU cores, DMA engines, caches, and the bus matrix that connects them. The resulting bugs are silent: a buffer placed in memory the DMA engine cannot reach, a cache line the DMA never sees, a descriptor armed before the CPU has finished writing it. We describe BML, a language and compiler (beemel) for ARM Cortex-M firmware, built around two ideas. First, every bus master is a first-class agent with its own reach, cache view, and permissions, and CPU/DMA memory sharing is checked at compile time. Second — our central claim — the CPU priority-ceiling protocol (mutual exclusion between interrupt and thread contexts) and the asynchronous DMA release/reclaim handshake are one concept, region ownership, with the synchronization mechanism derived from the set of sharers — the programmer declares the sharing and the ownership window, not which exclusion protocol to emit. The model was built failure-first: every check traces to a specific hardware bug we provoked on a development board, and the result was validated back on silicon across three DMA architectures (ST crossbar, RP2350 per-channel, nRF51 fixed-block). We position the work against the priority-ceiling literature (which covers the CPU half only) and the formal DMA-isolation and OS memory-model literature (which treats DMA but never unifies it with CPU-side mutual exclusion). These are compile-time analyses plus a test suite, not formal proofs; we are explicit about the resulting trust boundary.

Zenodo (CERN European Organization for Nuclear Research)
Reduced inequalities
Security and Verification in Computing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Region Ownership: Unifying the Priority-Ceiling Protocol and DMA Handshakes in a Bare-Metal Language — Daniel Tralamazza · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS