Add support for 2MB and 1GB map

This commit is contained in:
Alex
2023-04-07 01:39:11 +03:00
parent 5becc15ed7
commit 540152a339
10 changed files with 239 additions and 116 deletions

View File

@ -92,7 +92,7 @@ namespace Execute
void *LibFile = mem->RequestPages(TO_PAGES(Length), true);
debug("LibFile: %#lx", LibFile);
memcpy(LibFile, (void *)ElfImage, Length);
Memory::Virtual().Map(LibFile, LibFile, TO_PAGES(Length), Memory::RW | Memory::US | Memory::G);
Memory::Virtual().Map(LibFile, LibFile, Length, Memory::RW | Memory::US | Memory::G);
Memory::Virtual ncpV = pV;
sl.MemoryImage = r_cst(uint64_t, ELFCreateMemoryImage(mem, ncpV, LibFile, Length).Phyiscal);