diff options
Diffstat (limited to 'arch/x86_64')
34 files changed, 215 insertions, 222 deletions
diff --git a/arch/x86_64/CMakeLists.txt b/arch/x86_64/CMakeLists.txt index a435ef9..cf92feb 100644 --- a/arch/x86_64/CMakeLists.txt +++ b/arch/x86_64/CMakeLists.txt @@ -92,15 +92,15 @@ target_sources("_exception" PRIVATE #]============================================================================] target_sources("_context" PRIVATE - "src/context_switching/descriptor_table/access_byte.cpp" - "src/context_switching/descriptor_table/gate_descriptor.cpp" - "src/context_switching/descriptor_table/gdt_flags.cpp" - "src/context_switching/descriptor_table/global_descriptor_table.cpp" - "src/context_switching/descriptor_table/global_descriptor_table_pointer.cpp" - "src/context_switching/descriptor_table/initialization.cpp" - "src/context_switching/descriptor_table/interrupt_descriptor_table.cpp" - "src/context_switching/descriptor_table/interrupt_descriptor_table_pointer.cpp" - "src/context_switching/descriptor_table/segment_descriptor.cpp" + "src/context_switching/segment_descriptor_table/access_byte.cpp" + "src/context_switching/segment_descriptor_table/gdt_flags.cpp" + "src/context_switching/segment_descriptor_table/global_descriptor_table.cpp" + "src/context_switching/segment_descriptor_table/global_descriptor_table_pointer.cpp" + "src/context_switching/segment_descriptor_table/segment_descriptor.cpp" + "src/context_switching/main.cpp" + "src/context_switching/interrupt_descriptor_table/gate_descriptor.cpp" + "src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.cpp" + "src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.cpp" ) #[============================================================================[ diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/gate_descriptor.hpp b/arch/x86_64/include/arch/context_switching/descriptor_table/gate_descriptor.hpp deleted file mode 100644 index f410219..0000000 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/gate_descriptor.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GATE_DESCRIPTOR_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GATE_DESCRIPTOR_HPP - -namespace teachos::arch::context_switching::descriptor_table -{ - struct [[gnu::packed]] gate_descriptor - { - /** - * @brief Default Constructor. - */ - gate_descriptor() = default; - }; -} // namespace teachos::arch::context_switching::descriptor_table - -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GATE_DESCRIPTOR_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/initialization.hpp b/arch/x86_64/include/arch/context_switching/descriptor_table/initialization.hpp deleted file mode 100644 index c587000..0000000 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/initialization.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_HPP - -#include "arch/context_switching/descriptor_table/global_descriptor_table.hpp" -#include "arch/context_switching/descriptor_table/interrupt_descriptor_table.hpp" - -namespace teachos::arch::context_switching::descriptor_table -{ - /** - * @brief TODO - * - */ - struct descriptor_tables - { - global_descriptor_table & gdt; ///< Reference to the global descriptor table. - interrupt_descriptor_table & idt; ///< Reference to the interrupt descriptor table. - }; - - auto initialize_descriptor_tables() -> descriptor_tables; - -} // namespace teachos::arch::context_switching::descriptor_table - -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/interrupt_descriptor_table.hpp b/arch/x86_64/include/arch/context_switching/descriptor_table/interrupt_descriptor_table.hpp deleted file mode 100644 index c63932d..0000000 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/interrupt_descriptor_table.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_HPP - -namespace teachos::arch::context_switching::descriptor_table -{ - struct interrupt_descriptor_table - { - }; - - auto initialize_interrupt_descriptor_table() -> void; - -} // namespace teachos::arch::context_switching::descriptor_table - -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_HPP diff --git a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/gate_descriptor.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/gate_descriptor.hpp new file mode 100644 index 0000000..2252b7b --- /dev/null +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/gate_descriptor.hpp @@ -0,0 +1,15 @@ +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_GATE_DESCRIPTOR_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_GATE_DESCRIPTOR_HPP + +namespace teachos::arch::context_switching::interrupt_descriptor_table +{ + struct [[gnu::packed]] gate_descriptor + { + /** + * @brief Default Constructor. + */ + gate_descriptor() = default; + }; +} // namespace teachos::arch::context_switching::interrupt_descriptor_table + +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_GATE_DESCRIPTOR_HPP diff --git a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.hpp new file mode 100644 index 0000000..ac52a39 --- /dev/null +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.hpp @@ -0,0 +1,14 @@ +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_HPP + +namespace teachos::arch::context_switching::interrupt_descriptor_table +{ + struct interrupt_descriptor_table + { + }; + + auto initialize_interrupt_descriptor_table() -> void; + +} // namespace teachos::arch::context_switching::interrupt_descriptor_table + +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/interrupt_descriptor_table_pointer.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.hpp index e8935f4..de40f90 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/interrupt_descriptor_table_pointer.hpp +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.hpp @@ -1,12 +1,12 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_POINTER_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_POINTER_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_POINTER_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_POINTER_HPP -#include "arch/context_switching/descriptor_table/gate_descriptor.hpp" +#include "arch/context_switching/interrupt_descriptor_table/gate_descriptor.hpp" #include "arch/stl/vector.hpp" #include <cstdint> -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::interrupt_descriptor_table { typedef stl::vector<gate_descriptor> interrupt_descriptor_table; @@ -34,9 +34,9 @@ namespace teachos::arch::context_switching::descriptor_table private: uint16_t table_length = {}; ///< The amount of segment descriptor entries in the global descriptor table - 1. - interrupt_descriptor_table address = {}; ///< Non-owning pointer to the IDT base address. + interrupt_descriptor_table * address = {}; ///< Non-owning pointer to the IDT base address. }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::interrupt_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_POINTER_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_INTERRRUPT_DESCRIPTOR_TABLE_INTERRUPT_DESCRIPTOR_TABLE_POINTER_HPP diff --git a/arch/x86_64/include/arch/context_switching/main.hpp b/arch/x86_64/include/arch/context_switching/main.hpp new file mode 100644 index 0000000..ef642d6 --- /dev/null +++ b/arch/x86_64/include/arch/context_switching/main.hpp @@ -0,0 +1,23 @@ +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_MAIN_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_MAIN_HPP + +#include "arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.hpp" +#include "arch/context_switching/segment_descriptor_table/global_descriptor_table.hpp" + +namespace teachos::arch::context_switching +{ + /** + * @brief TODO + * + */ + struct descriptor_tables + { + segment_descriptor_table::global_descriptor_table & gdt; ///< Reference to the global descriptor table. + interrupt_descriptor_table::interrupt_descriptor_table & idt; ///< Reference to the interrupt descriptor table. + }; + + auto initialize_descriptor_tables() -> descriptor_tables; + +} // namespace teachos::arch::context_switching + +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_MAIN_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/access_byte.hpp index 646c2ca..bbf3f49 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/access_byte.hpp @@ -1,11 +1,11 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_ACCESS_BYTE_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_ACCESS_BYTE_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_ACCESS_BYTE_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_ACCESS_BYTE_HPP #include <bitset> #include <cstdint> -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { /** * @brief Defines helper function for all states that the access byte field of a segment descriptor can @@ -92,6 +92,6 @@ namespace teachos::arch::context_switching::descriptor_table private: uint8_t _flags = {}; ///< Underlying bitset used to read the flags from. }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_ACCESS_BYTE_HPP
\ No newline at end of file +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_ACCESS_BYTE_HPP
\ No newline at end of file diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/gdt_flags.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/gdt_flags.hpp index de41762..2ce5286 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/gdt_flags.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/gdt_flags.hpp @@ -1,11 +1,11 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GDT_FLAGS_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GDT_FLAGS_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GDT_FLAGS_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GDT_FLAGS_HPP -#include "arch/context_switching/descriptor_table/segment_descriptor_type.hpp" +#include "arch/context_switching/segment_descriptor_table/segment_descriptor_type.hpp" #include <bitset> -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { /** * @brief Defines helper function for all states that the flags field of a segment descriptor can @@ -81,6 +81,6 @@ namespace teachos::arch::context_switching::descriptor_table uint8_t _limit_2 : 4 = {}; uint8_t _flags : 4 = {}; ///< Underlying bitset used to read the flags from. }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GDT_FLAGS_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GDT_FLAGS_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/global_descriptor_table.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/global_descriptor_table.hpp index 75e1e9d..a111a1f 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/global_descriptor_table.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/global_descriptor_table.hpp @@ -1,10 +1,10 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_HPP -#include "arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp" -#include "arch/context_switching/descriptor_table/task_state_segment.hpp" +#include "arch/context_switching/segment_descriptor_table/global_descriptor_table_pointer.hpp" +#include "arch/context_switching/segment_descriptor_table/task_state_segment.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { enum class access_level { @@ -50,6 +50,6 @@ namespace teachos::arch::context_switching::descriptor_table */ auto initialize_global_descriptor_table() -> global_descriptor_table &; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/global_descriptor_table_pointer.hpp index ed17be3..b66070b 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/global_descriptor_table_pointer.hpp @@ -1,12 +1,12 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_POINTER_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_POINTER_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_POINTER_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_POINTER_HPP -#include "arch/context_switching/descriptor_table/segment_descriptor.hpp" +#include "arch/context_switching/segment_descriptor_table/segment_descriptor.hpp" #include "arch/stl/vector.hpp" #include <cstdint> -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { typedef stl::vector<segment_descriptor> global_descriptor_table; @@ -37,6 +37,6 @@ namespace teachos::arch::context_switching::descriptor_table uint16_t table_length = {}; ///< The amount of segment descriptor entries in the global descriptor table - 1. global_descriptor_table * address = {}; ///< Non-owning pointer to the GDT base address. }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_POINTER_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_GLOBAL_DESCRIPTOR_TABLE_POINTER_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/segment_descriptor.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/segment_descriptor.hpp index 8714eb8..7fe4ecb 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/segment_descriptor.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/segment_descriptor.hpp @@ -1,11 +1,11 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_HPP -#include "arch/context_switching/descriptor_table/access_byte.hpp" -#include "arch/context_switching/descriptor_table/gdt_flags.hpp" -#include "arch/context_switching/descriptor_table/segment_descriptor_type.hpp" +#include "arch/context_switching/segment_descriptor_table/access_byte.hpp" +#include "arch/context_switching/segment_descriptor_table/gdt_flags.hpp" +#include "arch/context_switching/segment_descriptor_table/segment_descriptor_type.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { __extension__ typedef __int128 int128_t; __extension__ typedef unsigned __int128 uint128_t; @@ -66,6 +66,6 @@ namespace teachos::arch::context_switching::descriptor_table uint64_t _base_2 : 40 = {}; ///< Second part of the base field (56 - 95) uint32_t : 32; ///< Reserved field used to ensure this struct is 128 bits big (96 - 127) }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/segment_descriptor_type.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/segment_descriptor_type.hpp index 4815fca..8770b81 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/segment_descriptor_type.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/segment_descriptor_type.hpp @@ -1,9 +1,9 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_TYPES_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_TYPES_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_TYPES_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_TYPES_HPP #include <cstdint> -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { /** * @brief Possible overlying types of the segment descriptor. Allowing to discern between the major types, which @@ -22,6 +22,6 @@ namespace teachos::arch::context_switching::descriptor_table ///< further distinguised to specific data segment types using the the remaining bits in ///< the Type Field in the Access Byte. }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_TYPES_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_SEGMENT_DESCRIPTOR_TYPES_HPP diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/task_state_segment.hpp b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/task_state_segment.hpp index 1e306af..d4aa5e8 100644 --- a/arch/x86_64/include/arch/context_switching/descriptor_table/task_state_segment.hpp +++ b/arch/x86_64/include/arch/context_switching/segment_descriptor_table/task_state_segment.hpp @@ -1,9 +1,9 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_TASK_STATE_SEGMENT_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_TASK_STATE_SEGMENT_HPP +#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_TASK_STATE_SEGMENT_HPP +#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_TASK_STATE_SEGMENT_HPP #include <cstdint> -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { /** * @brief 64-bit task state segment @@ -27,6 +27,6 @@ namespace teachos::arch::context_switching::descriptor_table uint16_t : 16; uint16_t io_map_base_address = {}; }; -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table -#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_DESCRIPTOR_TABLE_TASK_STATE_SEGMENT_HPP +#endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SEGMENT_DESCRIPTOR_TABLE_TASK_STATE_SEGMENT_HPP diff --git a/arch/x86_64/include/arch/kernel/cpu/gdtr.hpp b/arch/x86_64/include/arch/kernel/cpu/gdtr.hpp index f9220b9..68b950d 100644 --- a/arch/x86_64/include/arch/kernel/cpu/gdtr.hpp +++ b/arch/x86_64/include/arch/kernel/cpu/gdtr.hpp @@ -1,7 +1,7 @@ #ifndef TEACHOS_ARCH_X86_64_KERNEL_CPU_GDTR_HPP #define TEACHOS_ARCH_X86_64_KERNEL_CPU_GDTR_HPP -#include "arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp" +#include "arch/context_switching/segment_descriptor_table/global_descriptor_table_pointer.hpp" #include <bitset> #include <cstdint> @@ -14,14 +14,13 @@ namespace teachos::arch::kernel::cpu * * @return Value of GDTR register. */ - auto store_global_descriptor_table() -> context_switching::descriptor_table::global_descriptor_table_pointer; + auto store_global_descriptor_table() -> context_switching::segment_descriptor_table::global_descriptor_table_pointer; /** * @brief Loads the global_descriptor_table_pointer into the global descriptor table register (GDTR). */ - auto - load_global_descriptor_table(context_switching::descriptor_table::global_descriptor_table_pointer const & gdt_pointer) - -> void; + auto load_global_descriptor_table( + context_switching::segment_descriptor_table::global_descriptor_table_pointer const & gdt_pointer) -> void; } // namespace teachos::arch::kernel::cpu diff --git a/arch/x86_64/include/arch/kernel/cpu/idtr.hpp b/arch/x86_64/include/arch/kernel/cpu/idtr.hpp index 724fbdf..cb800d0 100644 --- a/arch/x86_64/include/arch/kernel/cpu/idtr.hpp +++ b/arch/x86_64/include/arch/kernel/cpu/idtr.hpp @@ -1,26 +1,26 @@ #ifndef TEACHOS_ARCH_X86_64_KERNEL_CPU_IDTR_HPP #define TEACHOS_ARCH_X86_64_KERNEL_CPU_IDTR_HPP -#include "arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp" +#include "arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.hpp" #include <bitset> #include <cstdint> namespace teachos::arch::kernel::cpu { - /** * @brief Returns the value in the IDTR register. * * @return Value of IDTR register. */ - auto store_interrupt_descriptor_table() -> context_switching::descriptor_table::interrupt_descriptor_table_pointer; + auto store_interrupt_descriptor_table() + -> context_switching::interrupt_descriptor_table::interrupt_descriptor_table_pointer; /** * @brief Loads the interrupt_descriptor_table_pointer into the interrupt descriptor table register (IDTR). */ auto load_interrupt_descriptor_table( - context_switching::descriptor_table::interrupt_descriptor_table_pointer const & idt_pointer) -> void; + context_switching::interrupt_descriptor_table::interrupt_descriptor_table_pointer const & idt_pointer) -> void; } // namespace teachos::arch::kernel::cpu diff --git a/arch/x86_64/include/arch/kernel/cpu/tr.hpp b/arch/x86_64/include/arch/kernel/cpu/tr.hpp index 562fab7..7c856f1 100644 --- a/arch/x86_64/include/arch/kernel/cpu/tr.hpp +++ b/arch/x86_64/include/arch/kernel/cpu/tr.hpp @@ -1,8 +1,6 @@ #ifndef TEACHOS_ARCH_X86_64_KERNEL_CPU_TR_HPP #define TEACHOS_ARCH_X86_64_KERNEL_CPU_TR_HPP -#include "arch/context_switching/descriptor_table/task_state_segment.hpp" - #include <bitset> #include <cstdint> diff --git a/arch/x86_64/src/context_switching/descriptor_table/gate_descriptor.cpp b/arch/x86_64/src/context_switching/descriptor_table/gate_descriptor.cpp deleted file mode 100644 index ee91e53..0000000 --- a/arch/x86_64/src/context_switching/descriptor_table/gate_descriptor.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "arch/context_switching/descriptor_table/gate_descriptor.hpp" - -namespace teachos::arch::context_switching::descriptor_table -{ -} // namespace teachos::arch::context_switching::descriptor_table diff --git a/arch/x86_64/src/context_switching/descriptor_table/gdt_flags.cpp b/arch/x86_64/src/context_switching/descriptor_table/gdt_flags.cpp deleted file mode 100644 index 9e95182..0000000 --- a/arch/x86_64/src/context_switching/descriptor_table/gdt_flags.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "arch/context_switching/descriptor_table/gdt_flags.hpp" - -namespace teachos::arch::context_switching::descriptor_table -{ - gdt_flags::gdt_flags(uint8_t flags, std::bitset<20U> limit) - : _limit_2(limit.to_ulong() >> 16U) - , _flags(flags) - { - // Nothing to do. - } - - auto gdt_flags::contains_flags(std::bitset<4U> other) const -> bool - { - return (std::bitset<4U>{_flags} & other) == other; - } - - auto descriptor_table::gdt_flags::get_limit() const -> std::bitset<4U> { return std::bitset<4U>{_limit_2}; } -} // namespace teachos::arch::context_switching::descriptor_table diff --git a/arch/x86_64/src/context_switching/descriptor_table/initialization.cpp b/arch/x86_64/src/context_switching/descriptor_table/initialization.cpp deleted file mode 100644 index 4d8b3e3..0000000 --- a/arch/x86_64/src/context_switching/descriptor_table/initialization.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "arch/context_switching/descriptor_table/initialization.hpp" - -#include "arch/boot/pointers.hpp" -#include "arch/exception_handling/assert.hpp" -#include "arch/kernel/cpu/if.hpp" -#include "arch/kernel/cpu/jmp.hpp" -#include "arch/kernel/cpu/tr.hpp" - -namespace teachos::arch::context_switching::descriptor_table -{ - auto initialize_descriptor_tables() -> descriptor_tables - { - decltype(auto) global_descriptor_table = context_switching::descriptor_table::initialize_global_descriptor_table(); - - // TODO: Replace random construction with return value of initialization. - interrupt_descriptor_table idt{}; - context_switching::descriptor_table::initialize_interrupt_descriptor_table(); - - kernel::cpu::jmp((uint64_t)&global_descriptor_table.at(1), boot::segment_register_reload_pointer); - - uint16_t const tss_selector = (global_descriptor_table.size() - 1) << 3; - kernel::cpu::load_task_register(tss_selector); - - // Not sure if offset index or offset in bytes is needed! - // uint16_t const tss_selector = (gdt.size() - 1) * sizeof(segment_descriptor); - // kernel::cpu::load_task_register(tss_selector); - - auto const stored_task_register = kernel::cpu::store_task_register(); - arch::exception_handling::assert(tss_selector == stored_task_register, - "[Global Descriptor Table] Loaded TR value is not the same as the stored value."); - - kernel::cpu::set_interrupt_flag(); - - descriptor_tables descriptor_tables = {global_descriptor_table, idt}; - return descriptor_tables; - } - -} // namespace teachos::arch::context_switching::descriptor_table
\ No newline at end of file diff --git a/arch/x86_64/src/context_switching/descriptor_table/interrupt_descriptor_table.cpp b/arch/x86_64/src/context_switching/descriptor_table/interrupt_descriptor_table.cpp deleted file mode 100644 index 9878664..0000000 --- a/arch/x86_64/src/context_switching/descriptor_table/interrupt_descriptor_table.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "arch/context_switching/descriptor_table/interrupt_descriptor_table.hpp" - -namespace teachos::arch::context_switching::descriptor_table -{ - auto initialize_interrupt_descriptor_table() -> void - { - // DO NOT - } - -} // namespace teachos::arch::context_switching::descriptor_table diff --git a/arch/x86_64/src/context_switching/interrupt_descriptor_table/gate_descriptor.cpp b/arch/x86_64/src/context_switching/interrupt_descriptor_table/gate_descriptor.cpp new file mode 100644 index 0000000..4f18197 --- /dev/null +++ b/arch/x86_64/src/context_switching/interrupt_descriptor_table/gate_descriptor.cpp @@ -0,0 +1,5 @@ +#include "arch/context_switching/interrupt_descriptor_table/gate_descriptor.hpp" + +namespace teachos::arch::context_switching::interrupt_descriptor_table +{ +} // namespace teachos::arch::context_switching::interrupt_descriptor_table diff --git a/arch/x86_64/src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.cpp b/arch/x86_64/src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.cpp new file mode 100644 index 0000000..619a695 --- /dev/null +++ b/arch/x86_64/src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.cpp @@ -0,0 +1,10 @@ +#include "arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table.hpp" + +namespace teachos::arch::context_switching::interrupt_descriptor_table +{ + auto initialize_interrupt_descriptor_table() -> void + { + // DO NOT + } + +} // namespace teachos::arch::context_switching::interrupt_descriptor_table diff --git a/arch/x86_64/src/context_switching/descriptor_table/interrupt_descriptor_table_pointer.cpp b/arch/x86_64/src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.cpp index b45324d..981944d 100644 --- a/arch/x86_64/src/context_switching/descriptor_table/interrupt_descriptor_table_pointer.cpp +++ b/arch/x86_64/src/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.cpp @@ -1,6 +1,6 @@ -#include "arch/context_switching/descriptor_table/interrupt_descriptor_table_pointer.hpp" +#include "arch/context_switching/interrupt_descriptor_table/interrupt_descriptor_table_pointer.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::interrupt_descriptor_table { interrupt_descriptor_table_pointer::interrupt_descriptor_table_pointer(uint16_t table_length, interrupt_descriptor_table * address) @@ -10,4 +10,4 @@ namespace teachos::arch::context_switching::descriptor_table // Nothing to do. } -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::interrupt_descriptor_table diff --git a/arch/x86_64/src/context_switching/main.cpp b/arch/x86_64/src/context_switching/main.cpp new file mode 100644 index 0000000..b682e79 --- /dev/null +++ b/arch/x86_64/src/context_switching/main.cpp @@ -0,0 +1,36 @@ +#include "arch/context_switching/main.hpp" + +#include "arch/boot/pointers.hpp" +#include "arch/exception_handling/assert.hpp" +#include "arch/kernel/cpu/if.hpp" +#include "arch/kernel/cpu/jmp.hpp" +#include "arch/kernel/cpu/tr.hpp" + +namespace teachos::arch::context_switching +{ + auto initialize_descriptor_tables() -> descriptor_tables + { + decltype(auto) global_descriptor_table = segment_descriptor_table::initialize_global_descriptor_table(); + + // TODO: Replace random construction with return value of initialization. + interrupt_descriptor_table::interrupt_descriptor_table idt{}; + interrupt_descriptor_table::initialize_interrupt_descriptor_table(); + + kernel::cpu::jmp((uint64_t)&global_descriptor_table.at(1), boot::segment_register_reload_pointer); + + // Load task state segment descriptor from the last element in the global descriptor table, done by calculating + // offset in bytes to the start of the segment descriptor (5 * 16) = 80 + uint16_t const tss_selector = + (global_descriptor_table.size() - 1) * sizeof(segment_descriptor_table::segment_descriptor); + kernel::cpu::load_task_register(tss_selector); + + auto const stored_task_register = kernel::cpu::store_task_register(); + arch::exception_handling::assert(tss_selector == stored_task_register, + "[Global Descriptor Table] Loaded TR value is not the same as the stored value."); + + kernel::cpu::set_interrupt_flag(); + + descriptor_tables tables = {global_descriptor_table, idt}; + return tables; + } +} // namespace teachos::arch::context_switching diff --git a/arch/x86_64/src/context_switching/descriptor_table/access_byte.cpp b/arch/x86_64/src/context_switching/segment_descriptor_table/access_byte.cpp index 6b54451..34a10f1 100644 --- a/arch/x86_64/src/context_switching/descriptor_table/access_byte.cpp +++ b/arch/x86_64/src/context_switching/segment_descriptor_table/access_byte.cpp @@ -1,6 +1,6 @@ -#include "arch/context_switching/descriptor_table/access_byte.hpp" +#include "arch/context_switching/segment_descriptor_table/access_byte.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { access_byte::access_byte(uint8_t flags) : _flags(flags) @@ -12,4 +12,4 @@ namespace teachos::arch::context_switching::descriptor_table { return (std::bitset<8U>{_flags} & other) == other; } -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table diff --git a/arch/x86_64/src/context_switching/segment_descriptor_table/gdt_flags.cpp b/arch/x86_64/src/context_switching/segment_descriptor_table/gdt_flags.cpp new file mode 100644 index 0000000..9885bda --- /dev/null +++ b/arch/x86_64/src/context_switching/segment_descriptor_table/gdt_flags.cpp @@ -0,0 +1,18 @@ +#include "arch/context_switching/segment_descriptor_table/gdt_flags.hpp" + +namespace teachos::arch::context_switching::segment_descriptor_table +{ + gdt_flags::gdt_flags(uint8_t flags, std::bitset<20U> limit) + : _limit_2(limit.to_ulong() >> 16U) + , _flags(flags) + { + // Nothing to do. + } + + auto gdt_flags::contains_flags(std::bitset<4U> other) const -> bool + { + return (std::bitset<4U>{_flags} & other) == other; + } + + auto gdt_flags::get_limit() const -> std::bitset<4U> { return std::bitset<4U>{_limit_2}; } +} // namespace teachos::arch::context_switching::segment_descriptor_table diff --git a/arch/x86_64/src/context_switching/descriptor_table/global_descriptor_table.cpp b/arch/x86_64/src/context_switching/segment_descriptor_table/global_descriptor_table.cpp index 639b079..1bbd24f 100644 --- a/arch/x86_64/src/context_switching/descriptor_table/global_descriptor_table.cpp +++ b/arch/x86_64/src/context_switching/segment_descriptor_table/global_descriptor_table.cpp @@ -1,13 +1,13 @@ -#include "arch/context_switching/descriptor_table/global_descriptor_table.hpp" +#include "arch/context_switching/segment_descriptor_table/global_descriptor_table.hpp" -#include "arch/context_switching/descriptor_table/segment_descriptor.hpp" -#include "arch/context_switching/descriptor_table/task_state_segment.hpp" +#include "arch/context_switching/segment_descriptor_table/segment_descriptor.hpp" +#include "arch/context_switching/segment_descriptor_table/task_state_segment.hpp" #include "arch/exception_handling/assert.hpp" #include "arch/kernel/cpu/gdtr.hpp" #include "arch/kernel/cpu/tr.hpp" #include "arch/stl/vector.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { auto create_segment_descriptor(segment_descriptor_type segment_descriptor_type, access_level access_level) -> segment_descriptor @@ -89,4 +89,4 @@ namespace teachos::arch::context_switching::descriptor_table return gdt; } -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table diff --git a/arch/x86_64/src/context_switching/descriptor_table/global_descriptor_table_pointer.cpp b/arch/x86_64/src/context_switching/segment_descriptor_table/global_descriptor_table_pointer.cpp index f552496..132565f 100644 --- a/arch/x86_64/src/context_switching/descriptor_table/global_descriptor_table_pointer.cpp +++ b/arch/x86_64/src/context_switching/segment_descriptor_table/global_descriptor_table_pointer.cpp @@ -1,6 +1,6 @@ -#include "arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp" +#include "arch/context_switching/segment_descriptor_table/global_descriptor_table_pointer.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { global_descriptor_table_pointer::global_descriptor_table_pointer(uint16_t table_length, global_descriptor_table * address) @@ -9,4 +9,4 @@ namespace teachos::arch::context_switching::descriptor_table { // Nothing to do. } -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table diff --git a/arch/x86_64/src/context_switching/descriptor_table/segment_descriptor.cpp b/arch/x86_64/src/context_switching/segment_descriptor_table/segment_descriptor.cpp index 2385c58..6d831a1 100644 --- a/arch/x86_64/src/context_switching/descriptor_table/segment_descriptor.cpp +++ b/arch/x86_64/src/context_switching/segment_descriptor_table/segment_descriptor.cpp @@ -1,6 +1,6 @@ -#include "arch/context_switching/descriptor_table/segment_descriptor.hpp" +#include "arch/context_switching/segment_descriptor_table/segment_descriptor.hpp" -namespace teachos::arch::context_switching::descriptor_table +namespace teachos::arch::context_switching::segment_descriptor_table { segment_descriptor::segment_descriptor(uint128_t flags) : _limit_1(flags << 112U) @@ -32,4 +32,4 @@ namespace teachos::arch::context_switching::descriptor_table return _access.contains_flags(access_byte::CODE_SEGMENT) ? segment_descriptor_type::CODE_SEGMENT : segment_descriptor_type::DATA_SEGMENT; } -} // namespace teachos::arch::context_switching::descriptor_table +} // namespace teachos::arch::context_switching::segment_descriptor_table diff --git a/arch/x86_64/src/kernel/cpu/gdtr.cpp b/arch/x86_64/src/kernel/cpu/gdtr.cpp index 2fe3a99..74a4e1c 100644 --- a/arch/x86_64/src/kernel/cpu/gdtr.cpp +++ b/arch/x86_64/src/kernel/cpu/gdtr.cpp @@ -1,19 +1,18 @@ #include "arch/kernel/cpu/gdtr.hpp" -#include "arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp" +#include "arch/context_switching/segment_descriptor_table/global_descriptor_table_pointer.hpp" namespace teachos::arch::kernel::cpu { - auto store_global_descriptor_table() -> context_switching::descriptor_table::global_descriptor_table_pointer + auto store_global_descriptor_table() -> context_switching::segment_descriptor_table::global_descriptor_table_pointer { - context_switching::descriptor_table::global_descriptor_table_pointer current_value{}; + context_switching::segment_descriptor_table::global_descriptor_table_pointer current_value{}; asm("sgdt %[output]" : [output] "=m"(current_value)); return current_value; } - auto - load_global_descriptor_table(context_switching::descriptor_table::global_descriptor_table_pointer const & gdt_pointer) - -> void + auto load_global_descriptor_table( + context_switching::segment_descriptor_table::global_descriptor_table_pointer const & gdt_pointer) -> void { asm volatile("lgdt %[input]" : /* no output from call */ : [input] "m"(gdt_pointer)); } diff --git a/arch/x86_64/src/kernel/cpu/idtr.cpp b/arch/x86_64/src/kernel/cpu/idtr.cpp index bbf34cb..7aa20c1 100644 --- a/arch/x86_64/src/kernel/cpu/idtr.cpp +++ b/arch/x86_64/src/kernel/cpu/idtr.cpp @@ -1,18 +1,17 @@ #include "arch/kernel/cpu/idtr.hpp" -#include "arch/context_switching/descriptor_table/interrupt_descriptor_table_pointer.hpp" - namespace teachos::arch::kernel::cpu { - auto store_global_descriptor_table() -> context_switching::descriptor_table::global_descriptor_table_pointer + auto store_interrupt_descriptor_table() + -> context_switching::interrupt_descriptor_table::interrupt_descriptor_table_pointer { - context_switching::descriptor_table::interrupt_descriptor_table_pointer current_value{}; + context_switching::interrupt_descriptor_table::interrupt_descriptor_table_pointer current_value{}; asm("sidt %[output]" : [output] "=m"(current_value)); return current_value; } auto load_interrupt_descriptor_table( - context_switching::descriptor_table::interrupt_descriptor_table_pointer const & idt_pointer) -> void + context_switching::interrupt_descriptor_table::interrupt_descriptor_table_pointer const & idt_pointer) -> void { asm volatile("lidt %[input]" : /* no output from call */ : [input] "m"(idt_pointer)); } diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index 9433558..7782d30 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -1,7 +1,7 @@ #include "arch/kernel/main.hpp" #include "arch/boot/pointers.hpp" -#include "arch/context_switching/descriptor_table/initialization.hpp" +#include "arch/context_switching/main.hpp" #include "arch/kernel/cpu/if.hpp" #include "arch/kernel/cpu/jmp.hpp" #include "arch/memory/heap/bump_allocator.hpp" @@ -63,7 +63,7 @@ namespace teachos::arch::kernel heap_test(); - decltype(auto) descriptor_tables = context_switching::descriptor_table::initialize_descriptor_tables(); + decltype(auto) descriptor_tables = context_switching::initialize_descriptor_tables(); (void)descriptor_tables; } } // namespace teachos::arch::kernel |
