diff options
Diffstat (limited to 'arch/x86_64')
| -rw-r--r-- | arch/x86_64/arch/cpu/initialization.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86_64/arch/cpu/initialization.cpp b/arch/x86_64/arch/cpu/initialization.cpp index 83493fe3..67bc2a4d 100644 --- a/arch/x86_64/arch/cpu/initialization.cpp +++ b/arch/x86_64/arch/cpu/initialization.cpp @@ -95,10 +95,10 @@ namespace arch::cpu { .limit_low = limit & 0xffff, // NOLINT(readability-magic-numbers) .base_low = address & 0xffffff, // NOLINT(readability-magic-numbers) - .accessed = false, + .accessed = true, .read_write = false, .direction_or_conforming = false, - .executable = false, + .executable = true, .type = segment_type::system, .privilege_level = 0, .present = true, @@ -126,6 +126,10 @@ namespace arch::cpu kstd::println("[ARCH:SYS] Reloading Global Descriptor Table."); gdt.load(1, 2); + kstd::println("[ARCH:SYS] Loading the Task Register."); + auto const tss_selector_offset = static_cast<std::uint16_t>(5 * sizeof(segment_descriptor)); + asm volatile("ltr %0" : : "r"(tss_selector_offset)); + kstd::println("[ARCH:SYS] Initializing Interrupt Descriptor Table."); auto static idt = interrupt_descriptor_table{}; idt.load(); |
