Bug resolving

This commit is contained in:
Adrien Bourmault 2019-04-01 17:58:58 +02:00
parent 090bfc3c8e
commit 4b06043e3f
1 changed files with 7 additions and 2 deletions

View File

@ -68,9 +68,10 @@ static error_t InitMemoryMap(void)
// fill the map // fill the map
while (currentEntry < mapEnd) { while (currentEntry < mapEnd) {
// memory zone address // memory zone address
memoryMap.entry[i].addr = (void*)((ulong)currentEntry->addr_low + memoryMap.entry[i].addr = (void*)((ullong)currentEntry->addr_low +
(((ulong)currentEntry->addr_high) << 32 )); (((ullong)currentEntry->addr_high) << 32 ));
// memory zone size in bytes // memory zone size in bytes
memoryMap.entry[i].length = (ulong)currentEntry->len_low + memoryMap.entry[i].length = (ulong)currentEntry->len_low +
(((ulong)currentEntry->len_high) << 32); (((ulong)currentEntry->len_high) << 32);
@ -82,6 +83,10 @@ static error_t InitMemoryMap(void)
currentEntry = (multiboot_memory_map_t*) ((ulong)currentEntry + currentEntry = (multiboot_memory_map_t*) ((ulong)currentEntry +
currentEntry->size + sizeof(currentEntry->size)); currentEntry->size + sizeof(currentEntry->size));
i++; 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", DebugLog("[InitMemoryMap] %d entries detected in the memory map\n",