Skip to content

Commit a5115de

Browse files
committed
kernel: Restore multiboot-provided memmap
1 parent 09b9edf commit a5115de

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/kernel/multiboot.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void OS::multiboot(uint32_t boot_addr)
100100
uint32_t mem_high_end = mem_high_start + (bootinfo_->mem_upper * 1024) - 1;
101101
uint32_t mem_high_kb = bootinfo_->mem_upper;
102102

103-
OS::memory_end_ = mem_high_kb * 1024 + mem_high_start;
103+
OS::memory_end_ = mem_high_end;
104104

105105
INFO2("* Valid memory (%i Kib):", mem_low_kb + mem_high_kb);
106106
INFO2("\t 0x%08x - 0x%08x (%i Kib)",
@@ -119,7 +119,6 @@ void OS::multiboot(uint32_t boot_addr)
119119
OS::cmdline = reinterpret_cast<const char*>(bootinfo_->cmdline);
120120
}
121121

122-
/*
123122
if (bootinfo_->flags & MULTIBOOT_INFO_MEM_MAP) {
124123
INFO2("* Multiboot provided memory map (%i entries @ %p)",
125124
bootinfo_->mmap_length / sizeof(multiboot_memory_map_t), (void*)bootinfo_->mmap_addr);
@@ -140,7 +139,6 @@ void OS::multiboot(uint32_t boot_addr)
140139
}
141140
printf("\n");
142141
}
143-
*/
144142

145143
Span_mods mods = modules();
146144

0 commit comments

Comments
 (0)