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/include/arch/boot/pointers.hpp | 2 +- arch/x86_64/include/arch/kernel/cpu/jmp.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/arch/boot/pointers.hpp b/arch/x86_64/include/arch/boot/pointers.hpp index 5bcb792..c08de52 100644 --- a/arch/x86_64/include/arch/boot/pointers.hpp +++ b/arch/x86_64/include/arch/boot/pointers.hpp @@ -13,7 +13,7 @@ namespace teachos::arch::boot /** * @brief Address pointing to the method that clears all segment registers. */ - extern "C" size_t const segment_register_reload_pointer; + extern "C" size_t reload_segment_register; } // namespace teachos::arch::boot diff --git a/arch/x86_64/include/arch/kernel/cpu/jmp.hpp b/arch/x86_64/include/arch/kernel/cpu/jmp.hpp index 5bc7d07..163fac6 100644 --- a/arch/x86_64/include/arch/kernel/cpu/jmp.hpp +++ b/arch/x86_64/include/arch/kernel/cpu/jmp.hpp @@ -12,9 +12,9 @@ namespace teachos::arch::kernel::cpu */ struct [[gnu::packed]] far_pointer { - uint64_t offset; ///< Selector of the segment in which the jump occurs. (0- 63) + std::size_t function; ///< Address of the function we want to jump too. (0- 63) context_switching::interrupt_descriptor_table::segment_selector - selector; ///< Address to jump to within the segment. (64 - 79) + selector; ///< Segment selector that shows the segment we want to jump into. (64 - 79) }; /** @@ -22,7 +22,7 @@ namespace teachos::arch::kernel::cpu * * @param address Address we want to jump to. */ - auto jmp(uint64_t address) -> void; + auto jmp(std::size_t address) -> void; /** * @brief Far jump - A jump to an instruction located in a different segment than the current code segment but at the -- cgit v1.2.3