diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-07-03 00:25:44 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-04 01:07:28 +0200 |
commit | c51b49a8cb8901eb36860718495cccf2d5f05eea (patch) | |
tree | a69b64f3d852f57901ac5962b2bb45c46e89dc32 /Kernel/Arch | |
parent | 04a912f68fa6e0fa529e480e74d12e287a62c850 (diff) | |
download | serenity-c51b49a8cb8901eb36860718495cccf2d5f05eea.zip |
Kernel: Implement TLS support for x86_64
Diffstat (limited to 'Kernel/Arch')
-rw-r--r-- | Kernel/Arch/x86/common/Processor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index 90a2b3af3b..263cb6803b 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -1214,6 +1214,9 @@ extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread) auto& tls_descriptor = processor.get_gdt_entry(GDT_SELECTOR_TLS); tls_descriptor.set_base(to_thread->thread_specific_data()); tls_descriptor.set_limit(to_thread->thread_specific_region_size()); +#else + MSR fs_base_msr(MSR_FS_BASE); + fs_base_msr.set(to_thread->thread_specific_data().get()); #endif if (from_regs.cr3 != to_regs.cr3) |