Skip to content

Virtualize NVIC_SystemReset #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 20, 2016

Conversation

AlessandroA
Copy link
Contributor

This PR virtualizes the NVIC_SystemReset API.

Note: The API can be used only by the debug box.

Upon merge, we need to update mbed OS and the version of CMSIS 5 it contains (there is a PR ready for that).

I'm also proposing the following change: The halt_error handler in a debug box should not trigger a reset automatically, as it is counterintuitive. Instead, uVisor will halt upon return.

The debug box can still call NVIC_SystemReset if it wants to.

@meriac @Patater @niklas-arm

@Patater
Copy link
Contributor

Patater commented Sep 20, 2016

Since halt_error is going back to the former behavior of not returning, we could also restore the __attribute__ ((__noreturn__)) to its declaration that was removed when we added the debug box feature.

@Patater
Copy link
Contributor

Patater commented Sep 20, 2016

I don't see the reason for adding vIRQ: Add reason to vIRQ_SystemReset right now. Consider dropping the commit (or describing in the commit message the reason for why we want to add this).

The `debug_halt_error` handler should not implicitly infer a reboot of
the system.

The debug box handler can reboot, if it thinks it's necessary. The newly
introduced vIRQ_SystemReset API can be used for this purpose.

By default, the debug handler will trigger a call to `uvisor_error`, a
user-level API to trigger a halt. The halt will have the newly
introduced reason `DEBUG_BOX_HALT`.
@AlessandroA AlessandroA force-pushed the virtualize_nvic_systemreset branch from a95808f to 7907d36 Compare September 20, 2016 13:03
@meriac meriac merged commit 80115d0 into ARMmbed:master Sep 20, 2016
halazouna added a commit to halazouna/mbed-os that referenced this pull request Sep 21, 2016
Change __STATIC_INLINE void NVIC_SystemReset(void) to __STATIC_INLINE void __NVIC_SystemReset(void) in core_cm3.h because of this PR ARMmbed/uvisor#334
@AlessandroA AlessandroA deleted the virtualize_nvic_systemreset branch January 19, 2017 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants