Skip to content

Improve interrupt/exception handling#43

Merged
elliotb-lowrisc merged 1 commit intolowRISC:mainfrom
elliotb-lowrisc:isrs
Feb 26, 2025
Merged

Improve interrupt/exception handling#43
elliotb-lowrisc merged 1 commit intolowRISC:mainfrom
elliotb-lowrisc:isrs

Conversation

@elliotb-lowrisc
Copy link
Contributor

Correctly discern interrupts from exceptions.
Previously, _trap_vector would ignore the interrupt bit of the mcause CSR.
This resulted in some exceptions (e.g. store access fault) to be misdiagnosed as interrupts (e.g. timer interrupt).

Also add handling of interrupts outside of the expected three.

Correctly discern interrupts from exceptions.
Previously, `_trap_vector` would ignore the `interrupt` bit of
the `mcause` CSR.
This resulted in some exceptions (e.g. store access fault) to be
misdiagnosed as interrupts (e.g. timer interrupt).

Also add handling of interrupts outside of the expected three.
@elliotb-lowrisc
Copy link
Contributor Author

I have tested this with a store access exception that no longer is misdiagnosed as a timer interrupt, and also tested the new unknown interrupt handler by temporarily commenting-out the branch instruction for the external interrupt handler and running a test that invokes an external interrupt.

@elliotb-lowrisc elliotb-lowrisc marked this pull request as ready for review February 18, 2025 13:34
Copy link
Contributor

@marnovandermaas marnovandermaas left a comment

Choose a reason for hiding this comment

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

Thanks, this looks correct to me.

@elliotb-lowrisc elliotb-lowrisc merged commit 6dd1952 into lowRISC:main Feb 26, 2025
1 check passed
@elliotb-lowrisc elliotb-lowrisc deleted the isrs branch February 26, 2025 08:53
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.

2 participants