aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/context_switching/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/context_switching/main.cpp')
-rw-r--r--arch/x86_64/src/context_switching/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86_64/src/context_switching/main.cpp b/arch/x86_64/src/context_switching/main.cpp
index 7be286a..faaf831 100644
--- a/arch/x86_64/src/context_switching/main.cpp
+++ b/arch/x86_64/src/context_switching/main.cpp
@@ -52,7 +52,14 @@ namespace teachos::arch::context_switching
{
kernel::cpu::validate_segment_registers(USER_DATA_SEGMENT_SELECTOR, USER_CODE_SEGMENT_SELECTOR);
- asm volatile("INT $0x80");
+ // TODO/INFO:
+ // https://stackoverflow.com/questions/46022184/osdev-syscall-sysret-and-sysenter-sysexit-instructions-enabling
+ // https://stackoverflow.com/questions/12806584/what-is-better-int-0x80-or-syscall-in-32-bit-code-on-linux
+ //
+ // People claim that SYSENTER is for 32-Bit, while SYSCALL is for 64-Bit!
+
+ // asm volatile("INT $0x80");
+ asm volatile("SYSCALL");
video::vga::text::write("Successfully entered user mode!", video::vga::text::common_attributes::green_on_black);
}