[PATCH 03/10] bsps/riscv: Improve bsp_interrupt_vector_enable()
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Nov 9 16:09:13 UTC 2022
Add support for hart-specific software and timer interrupts.
---
bsps/riscv/riscv/irq/irq.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index 8de9e47cbc..3bce33ae13 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -437,8 +437,16 @@ rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
}
rtems_interrupt_lock_release(&riscv_plic_lock, &lock_context);
+ return RTEMS_SUCCESSFUL;
+ }
+
+ if (vector == RISCV_INTERRUPT_VECTOR_TIMER) {
+ set_csr(mie, MIP_MTIP);
+ return RTEMS_SUCCESSFUL;
}
+ _Assert(vector == RISCV_INTERRUPT_VECTOR_SOFTWARE);
+ set_csr(mie, MIP_MSIP);
return RTEMS_SUCCESSFUL;
}
--
2.35.3
More information about the devel
mailing list