Kernel: Implement more x86_64 context switching functionality

This commit is contained in:
Gunnar Beutner 2021-06-27 19:49:19 +02:00 committed by Andreas Kling
commit 32840dfa17
Notes: sideshowbarker 2024-07-18 11:25:19 +09:00
8 changed files with 151 additions and 132 deletions

View file

@ -185,7 +185,7 @@ RefPtr<Process> Process::create_kernel_process(RefPtr<Thread>& first_thread, Str
first_thread->regs().esp = FlatPtr(entry_data); // entry function argument is expected to be in regs.esp
#else
first_thread->regs().rip = (FlatPtr)entry;
first_thread->regs().rsp = FlatPtr(entry_data); // entry function argument is expected to be in regs.rsp
first_thread->regs().rdi = FlatPtr(entry_data); // entry function argument is expected to be in regs.rdi
#endif
if (process->pid() != 0) {