rust-embedded / rust-embedded/cortex-m
Cache maintenance operations require reference to self
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 202
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 2
Description
Various cache maintenance-related operations require a self reference, which means that it is not possible for a HAL or other peripherals to clean/invalidate and/or perform other cache related operations without owning the SCB.
In the context of DMA, this can be a stumbling block, as DCACHE needs to be cleaned and invalidated before and after transfers (if it is enabled).
Is it possible to refactor the cache maintenance functions to not require a self reference so that they can be called statically as cortex_m::peripherals::scb::invalidate_dcache_by_address()?
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
Start by locating the SCB cache-maintenance functions, especially invalidate_dcache_by_address, and inspect why they require an SCB instance. Check the existing cache APIs and their tests or call sites; done means the relevant operations can be called without owning SCB while retaining their current behavior, including DMA use cases.
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
- Mostly clear
- Newbie friendliness
- 35/100