X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/28c176b668c841a3b7fb093faccf0efa39257603..3164991854344469bc3a9e8afd41ffd90f11a93f:/lunaix-os/arch/x86/boot/boot_helper.c?ds=sidebyside diff --git a/lunaix-os/arch/x86/boot/boot_helper.c b/lunaix-os/arch/x86/boot/boot_helper.c index c5f0c46..2bc35a4 100644 --- a/lunaix-os/arch/x86/boot/boot_helper.c +++ b/lunaix-os/arch/x86/boot/boot_helper.c @@ -1,7 +1,12 @@ #include #include +#include +#include +#include -#include "sys/mm/mm_defs.h" +#include +#include +#include #ifdef CONFIG_ARCH_X86_64 @@ -15,7 +20,10 @@ boot_begin_arch_reserve(struct boot_handoff* bhctx) void boot_clean_arch_reserve(struct boot_handoff* bhctx) { - return; + pfn_t start; + + start = leaf_count(__ptr(__kboot_start)); + pmm_unhold_range(start, leaf_count(__ptr(__kboot_end)) - start); } #else @@ -42,5 +50,19 @@ boot_clean_arch_reserve(struct boot_handoff* bhctx) vmm_unset_ptes(ptep, count); } +#endif + +extern void +mb_parse(struct boot_handoff* bhctx); + +struct boot_handoff* +prepare_boot_handover() +{ + struct boot_handoff* handoff; + + handoff = bootmem_alloc(sizeof(*handoff)); + + mb_parse(handoff); -#endif \ No newline at end of file + return handoff; +} \ No newline at end of file