-
Notifications
You must be signed in to change notification settings - Fork 228
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
⚠️ Rework FIRQ System (re-rework): use MIP to clear/ack IRQs #236
Merged
Conversation
This file contains 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
The FIRQ MIP bits have to be explicitly set to one to clear a pending fast interrupt request. CPU FIRQ inputs are one-shot triggered and internally buffered until explicitly cleared again. This will replace the device-specific interrupt ACK/clear mechanism.
stnolting
added
risc-v compliance
Modification to comply with official RISC-V specs.
HW
Hardware-related
labels
Dec 8, 2021
stnolting
changed the title
Rework FIRQ System (re-rework)
⚠️ Rework FIRQ System (re-rework)
Dec 8, 2021
stnolting
changed the title
⚠️ Rework FIRQ System (re-rework)
⚠️ Rework FIRQ System (re-rework): use MIP to clear/ack IRQs
Dec 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
HW
Hardware-related
risc-v compliance
Modification to comply with official RISC-V specs.
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.
This a rework of the Fast Interrupt Requests (FIRQ) system (a remake of #176).
Old Version (Current State)
The current FIRQ system implements module-specific mechanisms to clear/acknowledge pending FIRQs. For example a pending UART RX interrupt can be acknowledged by either writing to the UART control register or by reading from the UART's RX FIFO.
New Version (This PR)
This PR aims to provide a uniform way of acknowledging FIRQs by removing the device-specific mechanisms and introducing read-write capabilities for the CPU's
mip
CSR.📚 The RISC-V privilege spec. allows
mip
to be read-write and to clear a pending interrupt by writing '1' to the according bit position.Example for the new FIRQ triggering (UART RX FIRQ):
mie
CSR bit is set.mip
register.The new FIRQ system simplifies the interrupt logic inside the peripheral modules. Furthermore, this concept allows more flexibility as the programmer can decide on which conditions a pending interrupt is actually cleared.
mip
CSR bit.