Support handling IRQ on SVC stack (and some EL2 fixes)#193
Merged
Conversation
Lets interrupt routines for Armv4 and Armv7 (but not Armv8 in EL2 mode) use SVC mode stack for the handler and not SYS mode stack. Useful if you are writing an RTOS and your SYS stack is actually the USR stack for the running task. Also better document the IRQ handlers, and fix a bug in the EL2 handler where ELR_hyp might have been corrupted.
We were not restoring the stack ELR_hyp register.
Also removes SCTLR dump because that wasn't useful (interrupt mask state is in CPSR, not SCTLR, and we know the interrupt is being unmasked OK).
adamgreig
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
svc-stack-interruptfeature so you can handle IRQs on the SVC stack instead of the SYS stack (which is useful if you are running an RTOS and the SYS stack is in fact the USR stack of the running thread and your ISR might cause the running thread to change)el2-modefeature