mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Kernel: Implement initializing threads on x86_64
This commit is contained in:
parent
f285241cb8
commit
9ed051fe25
Notes:
sideshowbarker
2024-07-18 11:27:03 +09:00
Author: https://github.com/gunnarbeutner
Commit: 9ed051fe25
Pull-request: https://github.com/SerenityOS/serenity/pull/8269
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/IdanHo
5 changed files with 59 additions and 44 deletions
|
@ -105,7 +105,13 @@ Thread::Thread(NonnullRefPtr<Process> process, NonnullOwnPtr<Region> kernel_stac
|
|||
m_regs.gs = GDT_SELECTOR_TLS | 3;
|
||||
}
|
||||
#else
|
||||
// Only IF is set when a process boots.
|
||||
m_regs.rflags = 0x0202;
|
||||
|
||||
if (m_process->is_kernel_process())
|
||||
m_regs.cs = GDT_SELECTOR_CODE0;
|
||||
else
|
||||
m_regs.cs = GDT_SELECTOR_CODE3 | 3;
|
||||
#endif
|
||||
|
||||
m_regs.cr3 = m_process->space().page_directory().cr3();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue