diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-03-15 11:29:26 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2025-03-15 12:03:23 +0000 |
| commit | 2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b (patch) | |
| tree | 04f77a457517c8c36e22dead8261191e560eae6d /arch/x86_64/src/kernel/main.cpp | |
| parent | f2b9ac8f0f22354241e9b78e47aa7cb94e5ef511 (diff) | |
| download | teachos-2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b.tar.xz teachos-2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b.zip | |
implement loading of gdtr register
Diffstat (limited to 'arch/x86_64/src/kernel/main.cpp')
| -rw-r--r-- | arch/x86_64/src/kernel/main.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index 4db9599..2c0b6c8 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -1,6 +1,7 @@ #include "arch/kernel/main.hpp" #include "arch/context_switching/descriptor_table/global_descriptor_table.hpp" +#include "arch/kernel/cpu/lgdt.hpp" #include "arch/memory/heap/bump_allocator.hpp" #include "arch/memory/heap/global_heap_allocator.hpp" #include "arch/memory/main.hpp" @@ -60,16 +61,8 @@ namespace teachos::arch::kernel heap_test(); - context_switching::descriptor_table::global_descriptor_table global_descriptor_table{ - context_switching::descriptor_table::initialize_global_descriptor_table()}; - - decltype(auto) x = global_descriptor_table.at(1); - if (global_descriptor_table.size() == 0) - { - } - if (x.get_segment_type() == context_switching::descriptor_table::segment_descriptor_type::CODE_SEGMENT) - { - } + auto global_descriptor_table = context_switching::descriptor_table::initialize_global_descriptor_table(); + (void)global_descriptor_table.at(1); video::vga::text::write("GDT FILLED", video::vga::text::common_attributes::green_on_black); } } // namespace teachos::arch::kernel |
