ARMmbed / ARMmbed/uvisor

mbed OS can't sleep when uVisor is enabled

Open
#420 1 comment 0 reactions 0 assignees View on GitHub
mirrored
Dominant language
C
Stars
135
Forks
72
PR merge metrics
No merged PRs in 30d

Description

The RTOS idle thread runs unprivileged. It'd be nice if it, through a register level gateway or vSleep API, could put the system to sleep.

Currently, the RTOS idle thread calls mbed OS sleep, which then calls `hal_sleep`, which has hundreds of implementations that do any number of things that unprivileged code can't do (leading to halts). For example, writing to the `SCB->SCR` register is a nono for unprivileged code (without the register level gateway), yet many implementations do this to control how deeply they want to sleep at various points throughout the program's execution.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the RTOS idle thread through mbed OS sleep to hal_sleep, then inspect how uVisor restricts access to SCB->SCR and related sleep operations. Compare the proposed register-level gateway and vSleep API approaches across the hal_sleep implementations; done means the idle thread can enter the intended sleep mode while uVisor remains enabled without halting.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, operating-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.