summaryrefslogtreecommitdiff
path: root/boot/fake_syscall_entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'boot/fake_syscall_entry.S')
-rw-r--r--boot/fake_syscall_entry.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/boot/fake_syscall_entry.S b/boot/fake_syscall_entry.S
new file mode 100644
index 0000000..ff2428d
--- /dev/null
+++ b/boot/fake_syscall_entry.S
@@ -0,0 +1,25 @@
+.section .text
+
+.extern fake_syscall_handler
+
+.global fake_syscall_entry
+fake_syscall_entry:
+ hlt
+
+.global fake_syscall_return
+fake_syscall_return:
+ cli
+ mov %rdi, %rsp
+ lgdt (%rsp)
+ add $16, %rsp
+
+ movw (%rsp), %ds
+ movw (%rsp), %es
+ movw (%rsp), %fs
+ movw (%rsp), %gs
+ movw (%rsp), %ss
+
+ add $8, %rsp
+
+ lretq
+