1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

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
parent 076692b1ef
commit 32840dfa17
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) {