ARMmbed / ARMmbed/uvisor

Remove the runtime OR operation on the register gateway function pointer

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

Description

The current implementation of the register gateway casts a read-only structure to a function pointer and executes it.

The gateway address must be OR-ed with 1 to ensure that the Thumb bit is set and that the branch to the gateway does not trigger an `INVPC` usage fault.

This OR operation at the moment needs to be performed explicitly, at runtime. The cast to a function pointer is not enough to set the Thumb bit.

Contributor guide

Open the contributing guide

Research direction

Locate the register gateway implementation and inspect how the read-only structure is cast to a function pointer and how the gateway address is OR-ed with 1. The change is complete when the runtime OR operation is removed without reintroducing the INVPC usage fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.