kernel: panic

This commit is contained in:
Matheus
2023-04-08 21:40:31 -03:00
parent e364f631e4
commit ad70e8741d
4 changed files with 34 additions and 3 deletions
+4 -1
View File
@@ -2,10 +2,13 @@
#include <logging.h>
#include <arch/cpu.h>
#include <arch/context.h>
#include <panic.h>
void interrupt_isr(int vec, context_t *ctx) {
isr_t *isr = &_cpu()->isr[vec];
__assert(isr->func);
if (isr->func == NULL)
_panic("Unregistered interrupt", ctx);
// TODO ipl check
isr->func(isr, ctx);