From 437c3554f9a86b6347d97f5e2a82543c1e068b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Fri, 28 Mar 2025 10:52:25 +0000 Subject: Attempt to fix ljmp. Might not be possible in Long mode --- arch/x86_64/src/kernel/cpu/jmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/x86_64/src/kernel') diff --git a/arch/x86_64/src/kernel/cpu/jmp.cpp b/arch/x86_64/src/kernel/cpu/jmp.cpp index 205c4a9..0c94693 100644 --- a/arch/x86_64/src/kernel/cpu/jmp.cpp +++ b/arch/x86_64/src/kernel/cpu/jmp.cpp @@ -2,13 +2,13 @@ namespace teachos::arch::kernel::cpu { - auto jmp(uint64_t address) -> void + auto jmp(std::size_t address) -> void { asm volatile("jmp *%[input]" : /* no output from call */ : [input] "r"(address)); } auto jmp(far_pointer pointer) -> void { - asm volatile("jmp *%[input]" : /* no output from call */ : [input] "m"(pointer)); + asm volatile("rex64 ljmp *%[input]" : /* no output from call */ : [input] "m"(pointer)); } } // namespace teachos::arch::kernel::cpu -- cgit v1.2.3