Nucleus
Barry System call interface 05ba3b0 (3 years, 2 months ago)
diff --git a/kernel/idt.c b/kernel/idt.c
index 3303aa8..0a93c55 100644
--- a/kernel/idt.c
+++ b/kernel/idt.c
@@ -7,9 +7,10 @@
#include <stdint.h>
#include <string.h>
-#include <nucleus/panic.h>
-#include <nucleus/memory.h>
#include <nucleus/cpu.h>
+#include <nucleus/memory.h>
+#include <nucleus/panic.h>
+#include <nucleus/task.h>
#include <io.h>
#include "desc.h"
@@ -212,7 +213,16 @@ __attribute__((interrupt))
static void
exc128(struct InterruptFrame *frame)
{
- exc_handler(128, frame, 0);
+ uintptr_t esi, *eax;
+ asm volatile(
+ "mov %%esi, %0;"
+ "lea -12(%%ebp), %1;"
+ : "=r" (esi), "=r" (eax));
+ *eax = syscall_handler(*eax, esi);
+
+ /* Send APIC EOI */
+ if (apic)
+ LAPIC(0xB0) = 0;
}
/* Interrupts */