diff options
Diffstat (limited to 'arch/x86_64/include')
3 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp index e8854f9..7bfb563 100644 --- a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp @@ -82,6 +82,13 @@ namespace teachos::arch::context_switching::interrupt_descriptor_table */ auto operator|=(std::bitset<3U> other) -> void; + /** + * @brief Combines all bits in the underlying data in the correct order to return a raw value containing all bits. + * + * @return Underlying value combined into it's full size. + */ + operator uint16_t() const { return static_cast<uint64_t>(_flags) | (static_cast<uint64_t>(_index) << 3U); } + private: uint8_t _flags : 3 = {}; ///< Underlying bits used to read the flags from. uint16_t _index : 13 = diff --git a/arch/x86_64/include/arch/context_switching/main.hpp b/arch/x86_64/include/arch/context_switching/main.hpp index 5537174..f8477ea 100644 --- a/arch/x86_64/include/arch/context_switching/main.hpp +++ b/arch/x86_64/include/arch/context_switching/main.hpp @@ -46,8 +46,6 @@ namespace teachos::arch::context_switching auto switch_context(interrupt_descriptor_table::segment_selector data_segment, interrupt_descriptor_table::segment_selector code_segment, void (*return_function)()) -> void; - auto setup_syscall() -> void; - } // namespace teachos::arch::context_switching #endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_MAIN_HPP diff --git a/arch/x86_64/include/arch/context_switching/syscall_handler.hpp b/arch/x86_64/include/arch/context_switching/syscall_handler.hpp deleted file mode 100644 index 5a46924..0000000 --- a/arch/x86_64/include/arch/context_switching/syscall_handler.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SYSCALL_HANDLER_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SYSCALL_HANDLER_HPP - -namespace teachos::arch::context_switching -{ - [[gnu::naked]] - auto syscall_handler() -> void; -} -#endif
\ No newline at end of file |
