From 4b06043e3f3e66b0fd61cedf795d361dc2c7a0f7 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Mon, 1 Apr 2019 17:58:58 +0200 Subject: [PATCH] Bug resolving --- kaleid/kernel/mm/map.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kaleid/kernel/mm/map.c b/kaleid/kernel/mm/map.c index 8738e04..96afb64 100644 --- a/kaleid/kernel/mm/map.c +++ b/kaleid/kernel/mm/map.c @@ -68,9 +68,10 @@ static error_t InitMemoryMap(void) // fill the map while (currentEntry < mapEnd) { + // memory zone address - memoryMap.entry[i].addr = (void*)((ulong)currentEntry->addr_low + - (((ulong)currentEntry->addr_high) << 32 )); + memoryMap.entry[i].addr = (void*)((ullong)currentEntry->addr_low + + (((ullong)currentEntry->addr_high) << 32 )); // memory zone size in bytes memoryMap.entry[i].length = (ulong)currentEntry->len_low + (((ulong)currentEntry->len_high) << 32); @@ -82,6 +83,10 @@ static error_t InitMemoryMap(void) currentEntry = (multiboot_memory_map_t*) ((ulong)currentEntry + currentEntry->size + sizeof(currentEntry->size)); i++; + + //DebugLog("addr high : %x, %x\n", currentEntry->addr_high,(ulong)currentEntry->addr_high); + DebugLog("addr shift %x\n", ((currentEntry->addr_high) << 32)); + } DebugLog("[InitMemoryMap] %d entries detected in the memory map\n",