Closed
Description
There is currently no support for working in privileged mode.
There should at least be
- a way to call the svc instruction
- This can be implemented by
cortex_m::asm::svc(num: u32)
- This can be implemented by
- a way to write thread mode privilege level
- This can be implemented by
cortex_m::register::control::write(Control)
and perhaps also something in the lines ofcortex_m::register::control::modify(f: F) where f: FnOnce(Control) -> Control
- This can be implemented by
The cortex_m_rt crate seem to already implement the possibility for overriding the SVC handler. So with these changed it should be possible to:
- Execute the work in need of privileged mode from the svc handler
- Set the thread mode from the SVC handler and then execute the work after returning from the handler.
Metadata
Metadata
Assignees
Labels
No labels