Skip to content

Privileged mode #58

Closed
Closed
@kjetilkjeka

Description

@kjetilkjeka

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)
  • 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 of cortex_m::register::control::modify(f: F) where f: FnOnce(Control) -> Control

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions