aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/context_switching/main.cpp
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2025-03-25 16:58:24 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2025-03-25 16:58:24 +0000
commit66fefaeb16bcbc4eae5ce5256ae76f51a155cded (patch)
tree121b05b3764c7825f4f87c43e0bce6dd32707d29 /arch/x86_64/src/context_switching/main.cpp
parentccb47845d99e098c183f596cd1a3eb1db5c676da (diff)
downloadteachos-66fefaeb16bcbc4eae5ce5256ae76f51a155cded.tar.xz
teachos-66fefaeb16bcbc4eae5ce5256ae76f51a155cded.zip
Implement idtr structure and document possible flags.
Diffstat (limited to 'arch/x86_64/src/context_switching/main.cpp')
-rw-r--r--arch/x86_64/src/context_switching/main.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86_64/src/context_switching/main.cpp b/arch/x86_64/src/context_switching/main.cpp
index b682e79..95a25e0 100644
--- a/arch/x86_64/src/context_switching/main.cpp
+++ b/arch/x86_64/src/context_switching/main.cpp
@@ -11,10 +11,7 @@ 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();
+ decltype(auto) interrupt_descriptor_table = interrupt_descriptor_table::initialize_interrupt_descriptor_table();
kernel::cpu::jmp((uint64_t)&global_descriptor_table.at(1), boot::segment_register_reload_pointer);
@@ -30,7 +27,7 @@ namespace teachos::arch::context_switching
kernel::cpu::set_interrupt_flag();
- descriptor_tables tables = {global_descriptor_table, idt};
+ descriptor_tables tables = {global_descriptor_table, interrupt_descriptor_table};
return tables;
}
} // namespace teachos::arch::context_switching