Add a process spawn syscall and use it to start a proc.

Also add a skeleton VirtualMemory manager to be used per process.
This commit is contained in:
Drew Galbraith 2023-05-30 20:55:03 -07:00
parent 5bcf1f4e4a
commit 3c3341a90f
7 changed files with 125 additions and 6 deletions

View file

@ -11,3 +11,11 @@ uint64_t SysCall1(uint64_t number, const void* first) {
uint64_t ZDebug(const char* message) {
return SysCall1(Z_DEBUG_PRINT, message);
}
uint64_t ZProcessSpawn(uint64_t elf_base, uint64_t elf_size) {
ZProcessSpawnReq req{
.elf_base = elf_base,
.elf_size = elf_size,
};
return SysCall1(Z_PROCESS_SPAWN, &req);
}