summaryrefslogtreecommitdiff
path: root/src/kernel/arch
diff options
context:
space:
mode:
authordzwdz2022-04-11 23:11:37 +0200
committerdzwdz2022-04-11 23:11:37 +0200
commit07b7e8ad787180b7e3eaccc819b9e5c4802edfcd (patch)
tree2215fd11cd9ab4ce49a490b9d77421cf83e093f8 /src/kernel/arch
parent4ebebf6d842e919db5c7499ee3b7cc738980cf25 (diff)
kernel/arch: only allow IRQs in the idle process
Diffstat (limited to 'src/kernel/arch')
-rw-r--r--src/kernel/arch/i386/sysenter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kernel/arch/i386/sysenter.c b/src/kernel/arch/i386/sysenter.c
index 5712ee3..1aee254 100644
--- a/src/kernel/arch/i386/sysenter.c
+++ b/src/kernel/arch/i386/sysenter.c
@@ -1,4 +1,5 @@
#include <kernel/arch/generic.h>
+#include <kernel/arch/i386/interrupts/irq.h>
#include <kernel/arch/i386/sysenter.h>
#include <kernel/proc.h>
#include <shared/syscalls.h>
@@ -21,6 +22,8 @@ _Noreturn void sysenter_stage2(void) {
regs->esp = (userptr_t) regs->ecx; // fix them up
regs->eip = (userptr_t) regs->edx;
+ irq_interrupt_flag(false);
+
val = _syscall(regs->eax, regs->ebx,
regs->esi, regs->edi, (uintptr_t)regs->ebp);
if (process_current->state == PS_RUNNING) { // TODO move to _syscall()