Get the second process elf from a MemoryObject instead of hardcoding.

Allows us to delete the CopyIntoNonResidentProcess function and simply
rely on the MemoryObject copy functions.
This commit is contained in:
Drew Galbraith 2023-06-07 00:19:15 -07:00
parent eb454300e6
commit e246f28d9c
7 changed files with 24 additions and 45 deletions

View file

@ -1,11 +1,12 @@
#include <mammoth/debug.h>
#include <mammoth/process.h>
constexpr uint64_t prog2 = 0x00000020'00000000;
#include <zcall.h>
int main() {
dbgln("Testing");
check(SpawnProcessFromElfRegion(prog2));
uint64_t vaddr;
check(ZAddressSpaceMap(Z_INIT_AS_SELF, 0, Z_INIT_BOOT_VMMO, &vaddr));
check(SpawnProcessFromElfRegion(vaddr));
dbgln("Return");
return 0;
}