-
Notifications
You must be signed in to change notification settings - Fork 53
Smivt: Including minor interrupt identity in HW-vectoring scenarios #635
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
base: master
Are you sure you want to change the base?
Conversation
|
I may be missing something, but can't see the use-case for this - mtopei already provides this information for IMSIC and ACLIC. |
It is not about the cost. It is about the atomicity. When you are in a vectored handler, you need the minor identity of the interrupt that triggered the handler. If you read the minor identity later (with interrupts still disabled), you can read the identity of a higher priority pending-enabled interrupt. |
|
OK, got it! That is certainly of value to SW; a typical use case is several peripherals of the same type - multiple interrupt table entries may point to the same interrupt handler SW, but that SW needs to know which peripheral to service. |
although your reply did lead me to the alternative: If reading topei after enabling interrupts, you will read your own identity. Does not seem to bad to me to be honest. It would have to be done before claiming the interrupt. |
|
|
||
| The major identity is held in bits 15:0 of the exception code field, | ||
| while the minor identity is held in bits XLEN-1:16 of the exception code field. | ||
| Together, the two identities form the full exception code, which is a WLRL field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to specify value of minor identity for major interrupts that are not external
| an OS may want to handle several interrupts with a common trampoline, | ||
| and therefore needs to know the major identity as well. | ||
|
|
||
| The major identity is held in bits 15:0 of the exception code field, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restrict change to xtvec.mode = ivt
No description provided.