Move PML4 initialization into the VirtualMemory class.

This commit is contained in:
Drew Galbraith 2023-05-30 21:39:19 -07:00
parent f22dd66c8d
commit 1db93e5b12
11 changed files with 39 additions and 25 deletions

View file

@ -60,7 +60,7 @@ uint64_t ProcessSpawn(ZProcessSpawnReq* req) {
dbgln("Proc spawn: %u:%u", req->elf_base, req->elf_size);
SharedPtr<Process> proc = MakeShared<Process>();
gProcMan->InsertProcess(proc);
uint64_t entry = LoadElfProgram(proc->cr3(), req->elf_base, req->elf_size);
uint64_t entry = LoadElfProgram(*proc, req->elf_base, req->elf_size);
proc->CreateThread(entry);
return 0;
}