rust-embedded / rust-embedded/aarch64-cpu
Switch away from tock-registers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 116
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
The code generated by tock-registers suffers from a couple of issues:
- It creates references to MMIO address space, which is unsound because references in Rust are deferenceable (https://github.com/rust-embedded/volatile-register/issues/10 and https://github.com/tock/tock-registers/issues/4)
- It doesn't stop LLVM emitting loads/stores that are very difficult to virtualise (https://github.com/rust-lang/rust/issues/131894)
We should switch to Google's safe-mmio, which fixes both of the above.
The alternative would be sending AArch64 MMIO fixes to Knurling's derive-mmio crate and using that instead (it is used heavily by aarch32 and aarch32-rt already).
Edit: This crate actually doesn't do any MMIO, so the unsoundness and the MMIO load issues are irrelevant.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the crate's use of tock-registers first and verify the edit's claim that it performs no MMIO. Compare the proposed safe-mmio migration with the derive-mmio alternative, then clarify the replacement's scope and completion criteria before changing the dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100