Correctly advance virtual address after mapping non-free regions

This commit is contained in:
2026-01-23 20:52:45 +01:00
parent 0b1b76e9df
commit b5f220a2ae

View File

@@ -422,6 +422,9 @@ Memory::MapEfiMemory(IN OUT PXTBL_PAGE_MAPPING PageMap,
/* Add any non-free memory mapping */
Status = MapVirtualMemory(PageMap, VirtualAddress, Descriptor->PhysicalStart,
Descriptor->NumberOfPages, MemoryType);
/* Update virtual address */
VirtualAddress = VirtualAddress + (Descriptor->NumberOfPages * MM_PAGE_SIZE);
}
else
{