Table of Contents

CIRD — Can It Run Doom

“Four Cortex-M0 cores. One SoC. One very old FPS. How hard could it be.”

Status: design draft, parked (2026-04-22).

Umbrella: Coulomb (RK3588 stack) — adjacent, not a prerequisite.

The question

RK3588 has (at least) four in-SoC Cortex-M0 cores:

Rules of the game:

  1. The AP does display: a VOP2 overlay plane DMA'd from a DDR carveout.
  2. The AP relays input via mailbox.
  3. Everything else — game tick, BSP traversal, software rasterization — happens on the M0.
  4. “Cheating” allowed: use DDR for code + state. As long as the M0 does the significant work.

Candidate scoring

Core SRAM DDR access Mailbox to AP Background duties Verdict
PMU0_MCU 8 KB none indirect sleep-state pause button only
PMU1_MCU 64 KB narrow bridge PMIC / thermal / S2R runner-up — jitter risk
DDR_MCU 32 KB direct (but owns it) no DDR training + DFS disqualified — stutters on DFS
BUS_MCU 32 KB full AXI none winner

Architecture (straw draft)

Ramp-up — what to verify before writing code

  1. Reachability of BUS_MCU's SRAM and reset-vector latch from AP. Mainline Linux has drivers for the Rockchip remoteproc; confirm BUS_MCU is one of the supported instances. TRM chapter on “MCU Subsystem” is the source of truth.
  2. Mailbox channels not already claimed by ATF / BL31 / PSCI. Pick one bidirectional pair.
  3. DDR carveout reservation. memory-region in the DT with no-map, handed to the M0 via a known base address.
  4. Cache coherence. BUS_MCU is almost certainly non-coherent to the AP L3. Either use a non-cacheable mapping on the AP side for the framebuffer, or explicit clean/invalidate around every flip.
  5. VOP2 overlay setup. One plane, 8-bit indexed color, scan-out from our carveout. Drop into KMS as an overlay plane; let the kernel composit (or take the CRTC outright).
  6. Doom port. Chocolate-Doom or the older id release. Strip SDL. Replace the video backend with “write to framebuffer + signal mailbox”. Replace input backend with “read from mailbox ring”. No sound (or mailbox-to-AP-PCM later).

Chicken-and-egg notes

Cheek options (for later)

Open questions

Status / next step

Parked. Pre-req to even starting: finish MegabitChip (DDR blob RE) and at least one clean boot on ampere with our own TPL. Then this becomes “write an M0 firmware and a small kernel driver”, which is a weekend.

Linked from start page.