arm: aarch32: spurious IRQ handler calling z_arm_reserved with wrong arguments' list #23372
Labels
area: ARM
ARM (32-bit) Architecture
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Milestone
Describe the bug
In (ARM) aarch32 architecture
z_irq_spurious()
is callingz_arm_reserved()
; this is a problem for Cortex-M at least, due to the following reason:z_arm_reserved()
is the fault exception handler and for Cortex-M it is supposed to get and deliver the LR (EXC_RETURN) to thez_arm_fault()
functionThe result is that z_isr_spurious() is still triggering a fault as specified but we will almost certainly be hit by an assert in z_arm_fault() as we are not able to get the right EXC_RETURN value.
Expected behavior
We expect to be able to get an accurate fault tracing when the spurious ISR handler triggers.
Impact
The impact is not high since we are getting a fault when the spurious ISR triggers, but the erroneous arguments' list from z_arm_fault() makes it hard to debug in some cases.
Additional context
Looking more into how z_irq_spurious() is implemented for other architectures, it is clear that almost all other architectures (including aarch64) make the handler invoke z_ARCH_fatal_error() directly. We need to change this here, to make the ARM-specific implementation align with all the other ARCHes.
The text was updated successfully, but these errors were encountered: