diff --git a/boot/xtldr/memory.cc b/boot/xtldr/memory.cc index 6591833..792330b 100644 --- a/boot/xtldr/memory.cc +++ b/boot/xtldr/memory.cc @@ -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 {