Verified Rust bare-metal kernel for Raspberry Pi 4 with cooperative tasks, EL0 agents, IPC, and W^X MMU
#rust#bare-metal#aarch64#kernel#raspberry-pi#no-std
harbor-kernel runtime workflow. Nodes: ingress, router, planner, executor, state, audit. Flow: ingress to router (primary); router to executor (primary); executor to state (primary); router to planner (supporting); planner to state (supporting); executor to audit (feedback).
Problem
I wanted a small Rust kernel for Raspberry Pi 4 that keeps the core operating-system mechanisms visible: cooperative tasks, EL0 agent execution, IPC, and W^X memory permissions. The repository metadata supports an experimental bare-metal AArch64 scope; I do not claim production use, adoption, or benchmark results.
System design
I structured the project as a no_std Rust bare-metal kernel for AArch64. The design centers on a cooperative task model, an EL0 boundary for agents, IPC primitives, and MMU configuration intended to enforce W^X permissions. I keep the boundaries explicit so that privilege changes, communication paths, and memory permissions can be inspected as kernel mechanisms rather than hidden runtime behavior.
Outcome
The result is a public repository focused on a verified Rust kernel foundation for Raspberry Pi 4. Its supported scope is the kernel architecture described in the metadata: bare-metal execution, cooperative scheduling, EL0 agents, IPC, and W^X MMU work. Where the metadata is silent, I treat the status as unknown rather than inferred.
Architecture
- no_std rust kernel
- aarch64 raspberry pi 4 target
- cooperative task model
- el0 agent boundary
- ipc primitives
- w^x mmu configuration
Runtime model
- bare-metal boot context
- cooperative scheduling
- user-mode agent execution
- message-oriented ipc
- explicit address-space permissions
Tooling
- Rust
- no_std
- AArch64
- Raspberry Pi 4
- GitHub
Reliability
- w^x memory policy
- privilege separation with el0
- cooperative control flow
- small bare-metal surface
- verification-oriented kernel scope
bare-metal boot context→cooperative scheduling→user-mode agent execution→message-oriented ipc→explicit address-space permissions
Constraints
This is a bare-metal Raspberry Pi 4 project, so the design stays close to hardware and does not assume a hosted OS runtime, a standard library, or a normal process model. The repository metadata does not provide test coverage, proof details, deployment status, or benchmark data.
Tradeoffs
Rust and no_std keep the implementation away from hosted runtime assumptions, but they also make hardware-specific work explicit. Cooperative scheduling is easier to inspect than preemption, while it requires tasks to yield intentionally. W^X and EL0 boundaries support isolation goals at the cost of MMU and context-management complexity.
Future
If I continue the project, I would make the verification story easier to inspect: name the invariants the kernel claims to hold, document how to rerun the checks that establish them, and state what remains unproven.