diff --git a/include/asm.h b/include/asm.h index 05f9c34..4ee55f6 100644 --- a/include/asm.h +++ b/include/asm.h @@ -36,7 +36,7 @@ // // Launch interrupt // -#define interrupt(n) asm volatile ("int %0" : : "N" (n) : "cc", "memory") +#define KeTriggerInterrupt(n) asm volatile ("int %0" : : "N" (n) : "cc", "memory") // // Returns whether IRQs are enabled diff --git a/kaleid/kernel/ke/panic.c b/kaleid/kernel/ke/panic.c index 63c4347..877c13f 100644 --- a/kaleid/kernel/ke/panic.c +++ b/kaleid/kernel/ke/panic.c @@ -79,7 +79,7 @@ noreturn void KeStartPanic(const char *fmt, ...) va_end(ap); if (KeIdtIsInitialized) - interrupt(0x3); + KeTriggerInterrupt(0x3); BStdOut->flusher(BStdOut); diff --git a/kaleid/kernel/ke/syscall.asm b/kaleid/kernel/ke/syscall.asm index 1181e3e..533834d 100644 --- a/kaleid/kernel/ke/syscall.asm +++ b/kaleid/kernel/ke/syscall.asm @@ -45,7 +45,7 @@ KeJumpToUserspace: push QWORD 0x202 ; rflags = interrupt enable + reserved bit push QWORD 0x1B ; Selector 0x18 (User Code) + RPL 3 push rsi ; Entry point in user space - + iretq