Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
  2. index 16a00823..fdcf3df4 100644
  3. --- a/Kernel/VM/MemoryManager.cpp
  4. +++ b/Kernel/VM/MemoryManager.cpp
  5. @@ -103,6 +103,12 @@ void MemoryManager::initialize_paging()
  6. continue;
  7.  
  8. auto diff = (u32)mmap->addr % PAGE_SIZE;
  9. +
  10. + if (diff) {
  11. + kprintf("MILK: Skipping unaligned memory at %p\n", (u32)mmap->addr);
  12. + continue;
  13. + }
  14. +
  15. if (diff != 0) {
  16. kprintf("MM: got an unaligned region base from the bootloader; correcting %p by %d bytes\n", mmap->addr, diff);
  17. diff = PAGE_SIZE - diff;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement