summaryrefslogtreecommitdiff
path: root/code/fe310/eos/interrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/fe310/eos/interrupt.c')
-rw-r--r--code/fe310/eos/interrupt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/code/fe310/eos/interrupt.c b/code/fe310/eos/interrupt.c
index b8c6540..28bd8d1 100644
--- a/code/fe310/eos/interrupt.c
+++ b/code/fe310/eos/interrupt.c
@@ -26,6 +26,12 @@ uintptr_t eos_intr_handle(uintptr_t int_num) {
return int_num;
}
+void handle_m_ext_interrupt(void) {
+ plic_source int_num = PLIC_claim_interrupt(&plic);
+ eos_intr_handle(int_num);
+ PLIC_complete_interrupt(&plic, int_num);
+}
+
void eos_intr_init(void) {
for (int i = 0; i < PLIC_NUM_INTERRUPTS; i++){
ext_interrupt_handler[i] = NULL;