Merge branch 'master' of gitlab.ibr.cs.tu-bs.de:vss/teaching/ws25/v_bsb2/Gruppe_003

This commit is contained in:
2026-02-23 15:54:58 +01:00

View File

@@ -76,10 +76,18 @@ void PageFrameAllocator::init(){
memory_map_entry = memory_map_entry->getNext();
}
Multiboot::Module* mod = Multiboot::getModule(0);
for (size_t i = 0; i < Multiboot::getModuleCount(); ++i) {
Multiboot::Module* mod = Multiboot::getModule(i);
if (!mod) continue;
mark_pageframes((uintptr_t)mod, (uintptr_t)mod + 1, false);
mark_pageframes((uintptr_t)mod->getStartAddress(), (uintptr_t)mod->getEndAddress(), false);
mark_pageframes((uintptr_t)mod->getStartAddress(),
(uintptr_t)mod->getEndAddress(),
false);
}
//mark other known regions as unavailable
mark_pageframes((uintptr_t)&___KERNEL_START___, (uintptr_t)&___KERNEL_END___, false);