aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2025-03-28 10:52:25 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2025-03-28 10:52:25 +0000
commit437c3554f9a86b6347d97f5e2a82543c1e068b05 (patch)
tree419241f4d0764eb211fb2e0005b003acb2a304ed /arch/x86_64/src/kernel
parente0eae9b9e905a1842b333823bfdb7c253cda8d1e (diff)
downloadteachos-437c3554f9a86b6347d97f5e2a82543c1e068b05.tar.xz
teachos-437c3554f9a86b6347d97f5e2a82543c1e068b05.zip
Attempt to fix ljmp. Might not be possible in Long mode
Diffstat (limited to 'arch/x86_64/src/kernel')
-rw-r--r--arch/x86_64/src/kernel/cpu/jmp.cpp4
1 files changed, 2 insertions, 2 deletions
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