mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 23:39:20 +00:00
Add support for 2MB and 1GB map
This commit is contained in:
@ -51,9 +51,7 @@ namespace Execute
|
||||
void *Buffer = KernelAllocator.RequestPages(TO_PAGES(Section->sh_size));
|
||||
memset(Buffer, 0, Section->sh_size);
|
||||
|
||||
Memory::Virtual pva = Memory::Virtual(Process->PageTable);
|
||||
for (size_t i = 0; i < TO_PAGES(Section->sh_size); i++)
|
||||
pva.Map((void *)((uintptr_t)Buffer + (i * PAGE_SIZE)), (void *)((uintptr_t)Buffer + (i * PAGE_SIZE)), Memory::PTFlag::RW | Memory::PTFlag::US);
|
||||
Memory::Virtual(Process->PageTable).Map((void *)Buffer, (void *)Buffer, Section->sh_size, Memory::PTFlag::RW | Memory::PTFlag::US);
|
||||
|
||||
Section->sh_offset = (uintptr_t)Buffer - (uintptr_t)BaseImage;
|
||||
debug("Section %ld", Section->sh_size);
|
||||
|
Reference in New Issue
Block a user