Skip to content

Conversation

Silabs-ArjanB
Copy link
Contributor

Signed-off-by: Arjan Bink [email protected]

@Silabs-ArjanB Silabs-ArjanB added the Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files) label Jul 26, 2022
Copy link
Contributor

@silabs-hfegran silabs-hfegran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I do not have any objections to the suggestion in the current form, I wonder if there is
any way we can avoid trampoline code to get to the nmi handler? In the this suggested change, all cases will require some sort of nmi -> offset(mtvec) = j nmi_handler -> nmi_handler sequence. This seems to be a necessary evil of tying nmi handlers to mtvec.

I guess my concern is if this is a good idea? Are there any possible security implications by letting a potential glitch actually bypass the jump to an nmi handler, instead of actually forcing execution at the actual handler location?

@Silabs-ArjanB
Copy link
Contributor Author

Hi @silabs-hfegran , the reason to use mtvec is because it is cheaper and it allows moving of all exception and interrupt related locations at once. The NMIs important for security raise an alert on major alert as well and can therefore fully be handled in hardware without the need to rely on the jump chain that you describe.

@Silabs-ArjanB Silabs-ArjanB merged commit 0ef455b into openhwgroup:master Aug 1, 2022
@Silabs-ArjanB Silabs-ArjanB deleted the ArjanB_nmiv branch August 1, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants