X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/92f6e64a6da763c45ff9f4ab5eafcab3d8766dcb..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/kernel/boot_helper.c diff --git a/lunaix-os/kernel/boot_helper.c b/lunaix-os/kernel/boot_helper.c index d50e471..3ac5bcb 100644 --- a/lunaix-os/kernel/boot_helper.c +++ b/lunaix-os/kernel/boot_helper.c @@ -37,8 +37,7 @@ boot_begin(struct boot_handoff* bhctx) /* Reserve region for all loaded modules */ for (size_t i = 0; i < bhctx->mods.mods_num; i++) { struct boot_modent* mod = &bhctx->mods.entries[i]; - pmm_mark_chunk_occupied(KERNEL_PID, - PN(mod->start), + pmm_mark_chunk_occupied(PN(mod->start), CEIL(mod->end - mod->start, PG_SIZE_BITS), PP_FGLOCKED); } @@ -87,7 +86,7 @@ boot_cleanup() // clean up for (size_t i = 0; i < (ptr_t)(&__kexec_boot_end); i += PG_SIZE) { vmm_del_mapping(VMS_SELF, (ptr_t)i); - pmm_free_page(KERNEL_PID, (ptr_t)i); + pmm_free_page((ptr_t)i); } }