aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/proc.asm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/proc.asm')
-rw-r--r--kernel/features/proc.asm7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/features/proc.asm b/kernel/features/proc.asm
index 3d6bbc4..1a2ba65 100644
--- a/kernel/features/proc.asm
+++ b/kernel/features/proc.asm
@@ -1,11 +1,14 @@
%define USER_CODE_SEGMENT 0x18
%define USER_DATA_SEGMENT 0x20
%define RING3_MASK 0b11
+%define INTERRUPT_FLAG 0x200
global proc_jump_userspace
extern _esp
extern _eip
proc_jump_userspace:
+ cli
+
mov ax, USER_DATA_SEGMENT | RING3_MASK
mov ds, ax
mov es, ax
@@ -17,7 +20,9 @@ proc_jump_userspace:
push eax
pushf
- sti
+ pop eax
+ or eax, INTERRUPT_FLAG
+ push eax
push USER_CODE_SEGMENT | RING3_MASK
push dword [_eip]