Skip to content
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

arm: aarch32: spurious IRQ handler calling z_arm_reserved with wrong arguments' list #23372

Closed
ioannisg opened this issue Mar 10, 2020 · 0 comments · Fixed by #23356
Closed
Assignees
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

Comments

@ioannisg
Copy link
Member

Describe the bug
In (ARM) aarch32 architecture z_irq_spurious() is calling z_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 the z_arm_fault() function
  • however, when z_irq_spurious() calls z_arm_fault(), it can not supply the EXC_RETURN value, as it has been "branched-in" by the ISR Wrapper function

The 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.

@ioannisg ioannisg added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug area: ARM ARM (32-bit) Architecture labels Mar 10, 2020
@ioannisg ioannisg added this to the v2.3.0 milestone Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants