From a5fdf14f0dbbfb1a9b558a482288468c3743a20d Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 4 Nov 2022 05:37:06 +0200 Subject: [PATCH] Todo --- Execute/Spawn.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Execute/Spawn.cpp b/Execute/Spawn.cpp index 6138534..0fd3464 100644 --- a/Execute/Spawn.cpp +++ b/Execute/Spawn.cpp @@ -38,6 +38,12 @@ namespace Execute void *BaseImage = KernelAllocator.RequestPages(TO_PAGES(ExFile->Node->Length)); memcpy(BaseImage, (void *)ExFile->Node->Address, ExFile->Node->Length); + /* + For some reason I can't map BaseImage. + Neither can I in the Tasking->CreateThread function. + Very strange. + */ + for (uint64_t i = 0; i < TO_PAGES(ExFile->Node->Length); i++) Memory::Virtual(Process->PageTable).Map((void *)((uint64_t)BaseImage + (i * PAGE_SIZE)), (void *)((uint64_t)BaseImage + (i * PAGE_SIZE)), Memory::PTFlag::US);