Add the ability to copy memory to non resident process.
Use/Test this by loading the user space elf from the kernel process before it starts rather than as a part of the first thread. This simplifies thread start a fair bit.
This commit is contained in:
parent
f6609983d2
commit
b9b45c5e45
9 changed files with 55 additions and 38 deletions
|
|
@ -25,6 +25,11 @@ const limine_file& GetInitProgram() {
|
|||
void LoadInitProgram() {
|
||||
const limine_file& init_prog = GetInitProgram();
|
||||
|
||||
gProcMan->InsertProcess(
|
||||
new Process(reinterpret_cast<uint64_t>(init_prog.address)));
|
||||
SharedPtr<Process> proc = MakeShared<Process>();
|
||||
gProcMan->InsertProcess(proc);
|
||||
|
||||
uint64_t entry =
|
||||
LoadElfProgram(proc->cr3(), reinterpret_cast<uint64_t>(init_prog.address),
|
||||
init_prog.size);
|
||||
proc->CreateThread(entry);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue