From 8bb6cdbad4a5a7468fe623df5f37b5619af99ff6 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Wed, 9 Jun 2021 22:23:33 +0200 Subject: [PATCH] Complete details about first 1MB reserved --- core/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/main.c b/core/main.c index 673dda9..835d3c2 100644 --- a/core/main.c +++ b/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),