InitRD: Use get_blocks_from_size()

This commit is contained in:
apio 2022-10-10 18:45:49 +02:00
parent 49c7900407
commit da84f1713c

View File

@ -114,8 +114,8 @@ void InitRD::for_each(void (*callback)(File& f))
void InitRD::init() void InitRD::init()
{ {
initrd_base = initrd_base = MemoryManager::get_unaligned_mappings(
MemoryManager::get_unaligned_mappings((void*)bootboot.initrd_ptr, bootboot.initrd_size / PAGE_SIZE + 1); (void*)bootboot.initrd_ptr, Utilities::get_blocks_from_size(PAGE_SIZE, bootboot.initrd_size));
kdbgln("physical base at %lx, size %lx, mapped to %p", bootboot.initrd_ptr, bootboot.initrd_size, initrd_base); kdbgln("physical base at %lx, size %lx, mapped to %p", bootboot.initrd_ptr, bootboot.initrd_size, initrd_base);
initrd_initialized = true; initrd_initialized = true;
} }