From f241551d646e2fdc5f2ee32ae65ba70496511d26 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Tue, 12 Oct 2021 20:17:33 +0800 Subject: [PATCH] memory: fix InitPaging memory map dump overflow --- memory/paging_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memory/paging_init.c b/memory/paging_init.c index 3564554..831c33a 100644 --- a/memory/paging_init.c +++ b/memory/paging_init.c @@ -70,9 +70,9 @@ void runtime_InitPaging() { (char *)entry < (char *)efiMemoryMap + efiMemoryMapSize; entry = NEXT_MEMORY_DESCRITOR(entry, efiDescriptorSize) { io_Printf( - " [%08x-%08x] -> [%08x] %s (%d)\n", + " [%08llx-%08llx] -> [%08llx] %s (%d)\n", entry->PhysicalStart, - entry->PhysicalStart + entry->NumberOfPages * SYSTEM_PAGE_SIZE, + entry->PhysicalStart + SYSTEM_PAGE_SIZE * entry->NumberOfPages, entry->VirtualStart, memoryTypeName(entry->Type), entry->Type);