riscv / riscv-aia

https://jira.riscv.org/browse/RVG-59
Creative Commons Attribution 4.0 International
81 stars 19 forks source link

Interrupt flow #45

Closed augsug closed 1 year ago

augsug commented 1 year ago

In PLIC Spec ,“Interrupt Completion:After the target has serviced the interrupt, it sends the associated interrupt gateway an interrupt completion message.” We don't have any completion regs in APLIC.what's the new interrupt flow in APLIC? image

jhauser-us commented 1 year ago

The original PLIC can signal an interrupt to multiple harts. After an interrupt is claimed by one hart, the PLIC must block reporting repeats of the same interrupt until completion has been indicated by the hart that successfully claimed the interrupt. The only reason it needs to do this blocking is to avoid sending repeats to the other harts that are not the active claimer.

The APLIC signals an interrupt only to a single hart. While that hart is processing the interrupt, it is expected to internally keep interrupts disabled (at least for interrupts at the same privilege level). This fact prevents a repeat of the interrupt from re-invoking the interrupt handler while the previous signal is being serviced. For level-sensitive interrupts, an interrupt handler is expected to remove the cause of the interrupt at its source before re-enabling interrupts internally. When level-sensitive interrupts are delivered by MSI, see Section 4.9.2, "Special consideration for level-sensitive interrupt sources".

Except for the handling described in Section 4.9.2, the APLIC has no need for a completion signal. Hence, there isn't one.

augsug commented 1 year ago

Thanks!