evidence · 4.8 KiB

remoteproc-skeleton-build.md

Committed at docs/evidence/second-core/remoteproc-skeleton-build.md. This is what grounds the requirements that cite it.

Open raw source

CPU0 carveout and read-only remoteproc skeleton (tasks 4.1-4.3)

Evidence class: host device-tree build and cross kernel build, 2026-10-12. No board. Nothing here has booted; task 5.1 is the first board use.

4.1 Carveout and node (DT build proof)

nix/dts/k230-tdisplay-mainline-cpu0-rproc.dtsi, included only by the opt-in nix/dts/k230-tdisplay-mainline-drm-hotplug-cpu0.dts (.#deviceTreeMainlineDrmHotplugCpu0). The daily tree is untouched: deviceTreeMainlineDrmHotplug and mainlineDrmHotplugDeviceTreeNormalName evaluate to the same derivations as master a486398a (2nf5ryig…-k230-tdisplay-mainline-drm-hotplug.dtb.drv, k5939fzs…-k230-mainline-drm-hotplug-dtb-normal-name.drv), as does the daily system toplevel (lhdphdj8…-nixos-system-…drv). nix/device-tree-mainline-drm.nix gained extraIncludes (empty default, byte-identical script) so the variant can include the hotplug dts.

Decompiled k230-tdisplay-mainline-drm-hotplug-cpu0.dtb (fdtget):

NodePropertyValue
/reserved-memory/cpu0-firmware@7000000reg0 7000000 0 100000 (1 MiB)
no-mappresent
/reserved-memory/framebuffer@10000000reg0 10000000 0 400000 (splash, unchanged, disjoint)
/soc/remoteproc@91102100compatiblecanaan,k230-cpu0-rproc
reg0 91102100 0 4 (CPU0 boot vector, outside sysclk 0x91102000+0x40)
resets<7 0>: phandle 7 = /soc/reset-controller@91101000, index 0 = RST_CPU0
memory-regionphandle 0x13 = cpu0-firmware@7000000

The carveout covers the window the heartbeat and echo payloads already ran in (image at +0, slot page at +0x2000), which Linux could otherwise allocate. 0x07000000 holds only U-Boot’s bootargs.txt before bootm.

Limit: deviation from the task text, which names nix build .#deviceTree (the vendor tree); the decision note moved this work to the mainline tree the board runs.

4.2 Driver skeleton (cross-build proof)

nix/patches/mainline/k230_cpu0_rproc.c, built in-tree by nix/kernel-mainline-drm-rproc.nix (.#kernelMainlineDrmRproc): the daily DRM kernel plus CONFIG_REMOTEPROC=y and CONFIG_K230_CPU0_REMOTEPROC=m. The daily kernel is not changed.

What it does at probe: refuses any resets other than a single <&rst RST_CPU0>; devm_reset_control_get_exclusive(); one read-only reset_control_status() (reset-k230.c registers no .status, so an error code is expected and reported); maps the vector register with devm_platform_ioremap_resource() and the carveout with devm_memremap(WC); registers a remoteproc with auto_boot = false and sysfs_read_only = true. .start/.stop return -EOPNOTSUPP. A cpu0_status attribute reports the vector register, the reset status code, the carveout and the slot-page magic. It contains no writel, no reset_control_reset/assert/deassert.

Proofs:

4.3 Why no mailbox yet

Stated in the driver’s header comment: the TRM’s mailbox map (section 2.9) lacks the interrupt-group wiring, lock semantics and CPU0 routing (docs/research/second-core-feasibility.md, UNVERIFIED), so the transport stays the polled slot page until a firmware speaks virtio/rpmsg; then a poll-mode (txdone_poll) mailbox controller attaches through .kick (design.md Decisions 1 and 5), replaceable by the hardware mailbox later.

Successor

Task 5.1 extended this driver to load and start CPU0; its board run and the new module hash are in linux-start-2026-10-12/README.md. The module hash above is the read-only skeleton’s.