summaryrefslogtreecommitdiff
path: root/kernel/usrspace.s
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/usrspace.s')
-rw-r--r--kernel/usrspace.s7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/usrspace.s b/kernel/usrspace.s
index e52f2e0..1d20f71 100644
--- a/kernel/usrspace.s
+++ b/kernel/usrspace.s
@@ -1,6 +1,7 @@
global userspace_init
-extern _binary_usrbin_bin_start
extern _binary_usrbin_bin_size
+extern _binary_usrbin_bin_start
+extern tss
userspace_init:
push ebp
@@ -32,8 +33,10 @@ usrcall:
mov fs, ax
mov gs, ax
mov eax, esp
+ ; save ESP in the TSS
+ mov [tss+4], eax
push dword 0x23
- push eax
+ push dword 0x00180000
pushf
push dword 0x1B
push dword 0x00100000