diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-24 23:28:37 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-24 23:28:37 +0300 |
| commit | 018624dd5b1692b88f7b2e85652ea7b898043b6d (patch) | |
| tree | 0aa018640dc6bd5ebca7120df95dca4269be61d6 /common/main.c | |
| parent | 4123ec776d3769728e1e12379887da34c12ee8f8 (diff) | |
| download | kmi-018624dd5b1692b88f7b2e85652ea7b898043b6d.tar.gz kmi-018624dd5b1692b88f7b2e85652ea7b898043b6d.zip | |
make process loading more generic
Diffstat (limited to 'common/main.c')
| -rw-r--r-- | common/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/main.c b/common/main.c index 9585f3d..a608266 100644 --- a/common/main.c +++ b/common/main.c @@ -10,6 +10,7 @@ #include <apos/debug.h> #include <apos/vmem.h> #include <arch/arch.h> +#include <arch/proc.h> #include <arch/irq.h> #include <libfdt.h> @@ -23,6 +24,7 @@ void __main main(void *fdt) setup_arch(fdt); init_pmem(fdt); + /* setup temporary virtual memory */ struct vmem *b = init_vmem(fdt); /* start up debugging in kernel IO */ @@ -30,5 +32,11 @@ void __main main(void *fdt) init_irq(fdt); init_timer(fdt); - init_proc(fdt, b); + init_proc(fdt); + /* free temporary virtual memory now that we're in the init process + * space */ + destroy_vmem(b); + + /* start running init program */ + run_init(cur_tcb(), fdt); } |
