adds trap handler

This commit is contained in:
2026-03-16 08:08:07 +01:00
parent 3ba7cdda9e
commit 58fc04bbb3

View File

@@ -1,4 +1,5 @@
#include "hwtimer.h" #include "hwtimer.h"
#include "platform.h"
#include "riscv-traps.h" #include "riscv-traps.h"
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
@@ -39,6 +40,11 @@ void trap_handler(uintptr_t mcause, uintptr_t mepc, uintptr_t mtval) {
hwtimer_handler(); hwtimer_handler();
_tx_timer_interrupt(); _tx_timer_interrupt();
break; break;
#ifdef TX_THREAD_SMP_INTER_CORE_INTERRUPT
case RISCV_INT_MSI:
set_aclint_msip(aclint, csr_read_mhartid(), 0);
break;
#endif
case RISCV_INT_MEI: case RISCV_INT_MEI:
puts("[INTERRUPT]: handler ext irq error!\n"); puts("[INTERRUPT]: handler ext irq error!\n");
while(1) while(1)