rust-embedded / rust-embedded/cortex-m
SWI / SVC support
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 202
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 2
Description
Could we add intrinsics for calling Software Interrupts (the SWI or SVC instruction)? We probably also want a mechanism for marshalling some number of integer arguments into registers, and back out again on the other side of the SWI (i.e. in the kernel).
TockOS do this with llvm_asm!, as you can see at https://github.com/tock/tock/blob/198ff4173e85f6b8474893c6784d38c12ead9dbb/arch/cortex-m0/src/lib.rs#L161
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 reading the referenced TockOS implementation in arch/cortex-m0/src/lib.rs, especially its llvm_asm! usage. Define the required SWI/SVC intrinsic behavior and argument marshalling, then verify that calls can pass integer arguments into the kernel and return them afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100