Browse Source

Complete details about first 1MB reserved

allocArea
Mathieu Maret 3 months ago
parent
commit
8bb6cdbad4
  1. 6
      core/main.c

6
core/main.c

@ -105,7 +105,11 @@ void kmain(unsigned long magic, unsigned long addr)
for (uint i = 0; i < size; i++) {
printf(" base_addr 0x%llx, length = 0x%llx, type = 0x%x\n", mmap[i].addr,
mmap[i].len, (uint32_t)mmap[i].type);
if(mmap[i].addr < 0x100000){ //Consider low memory taken (https://wiki.osdev.org/Detecting_Memory_(x86). For example by VGA
// Consider low memory taken (https://wiki.osdev.org/Detecting_Memory_(x86). For
// example by VGA
// Turns out linux and windows do the same !
// https://lore.kernel.org/lkml/MWHPR21MB159330952629D36EEDE706B3D7379@MWHPR21MB1593.namprd21.prod.outlook.com/
if (mmap[i].addr < 0x100000) {
continue;
}
memAddBank(max(mmap[i].addr, (multiboot_uint64_t)lastUsedByMem),

Loading…
Cancel
Save