X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b9f4a7b7475e62dbff22da6dd768222f03889c00..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/kernel/boot_helper.c diff --git a/lunaix-os/kernel/boot_helper.c b/lunaix-os/kernel/boot_helper.c index 1383f60..3ac5bcb 100644 --- a/lunaix-os/kernel/boot_helper.c +++ b/lunaix-os/kernel/boot_helper.c @@ -4,6 +4,7 @@ #include #include #include +#include #include /** @@ -36,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); } @@ -86,6 +86,15 @@ 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); } +} + +void +boot_parse_cmdline(struct boot_handoff* bhctx) { + if (!bhctx->kexec.len) { + return; + } + + kcmd_parse_cmdline(bhctx->kexec.cmdline); } \ No newline at end of file