aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
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/include
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/include')
-rw-r--r--arch/x86_64/include/arch/boot/pointers.hpp2
-rw-r--r--arch/x86_64/include/arch/kernel/cpu/jmp.hpp6
2 files changed, 4 insertions, 4 deletions
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