Parcourir la source

Kernel: Ignore memory the bootloader gives us above 2^32

Conrad Pankoff il y a 5 ans
Parent
commit
9c5e3cd818
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      Kernel/VM/MemoryManager.cpp

+ 3 - 0
Kernel/VM/MemoryManager.cpp

@@ -99,6 +99,9 @@ void MemoryManager::initialize_paging()
         if (mmap->addr < (1 * MB))
             continue;
 
+        if ((mmap->addr + mmap->len) > 0xffffffff)
+            continue;
+
 #ifdef MM_DEBUG
         kprintf("MM: considering memory at %p - %p\n",
             (u32)mmap->addr, (u32)(mmap->addr + mmap->len));