diff --git a/boot/main.c b/boot/main.c index 519a6eb..fab71dd 100644 --- a/boot/main.c +++ b/boot/main.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,8 @@ static void kernel_main_task(uintptr_t arg0) { // Finish the initgraph. initgraph_run(nullptr, info); + module_init(); + // TODO: Try to run init. assert(info->num_files >= 1, "No init executable provided"); diff --git a/dev/pci/core.c b/dev/pci/core.c index b7e41cf..bd65e55 100644 --- a/dev/pci/core.c +++ b/dev/pci/core.c @@ -373,4 +373,3 @@ static void pci_stage_init(struct boot_info*) { } INIT_TASK(pci_stage, "dev.pci", pci_stage_init); INIT_DEPENDS(pci_stage, mem_stage); -INIT_ENTAILS(pci_stage, module_stage); diff --git a/include/zinnia/module.h b/include/zinnia/module.h index f89e6d7..74ca789 100644 --- a/include/zinnia/module.h +++ b/include/zinnia/module.h @@ -90,10 +90,8 @@ struct module { #define THIS_MODULE (struct module*)nullptr struct boot_info; -void module_init(struct boot_info* info); +void module_init(); errno_t module_load(const void* data, size_t length, const char* cmdline, struct module** out); errno_t module_unload(struct module* mod); struct module* module_find(const char* name); - -INIT_EXTERN(module_stage);