aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/context_switching
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2025-04-27 10:21:29 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2025-04-27 10:21:29 +0000
commitc865eff02ae1978b4f665432d853374d1ffacecf (patch)
tree210f93b7092d11f72018c2b7999f31555eef2968 /arch/x86_64/src/context_switching
parent5f149faeb9d41bb56733075b0e56908b3731d38d (diff)
downloadteachos-c865eff02ae1978b4f665432d853374d1ffacecf.tar.xz
teachos-c865eff02ae1978b4f665432d853374d1ffacecf.zip
create trampoline for syscall
Diffstat (limited to 'arch/x86_64/src/context_switching')
-rw-r--r--arch/x86_64/src/context_switching/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86_64/src/context_switching/main.cpp b/arch/x86_64/src/context_switching/main.cpp
index faaf831..c949488 100644
--- a/arch/x86_64/src/context_switching/main.cpp
+++ b/arch/x86_64/src/context_switching/main.cpp
@@ -1,5 +1,6 @@
#include "arch/context_switching/main.hpp"
+#include "arch/boot/pointers.hpp"
#include "arch/exception_handling/assert.hpp"
#include "arch/kernel/cpu/call.hpp"
#include "arch/kernel/cpu/control_register.hpp"
@@ -59,7 +60,8 @@ namespace teachos::arch::context_switching
// People claim that SYSENTER is for 32-Bit, while SYSCALL is for 64-Bit!
// asm volatile("INT $0x80");
- asm volatile("SYSCALL");
+ // asm volatile("SYSCALL");
+ boot::syscall_trampoline();
video::vga::text::write("Successfully entered user mode!", video::vga::text::common_attributes::green_on_black);
}