This commit is contained in:
Alex 2022-11-04 05:37:06 +02:00
parent 5de0a3972c
commit a5fdf14f0d
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -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);