aboutsummaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-05-24 13:24:27 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-05-24 18:13:43 +0300
commitbc600ecc3bdf0f189861dfb840f70c2339a7a853 (patch)
treed9840b1dc1b865442a028c03ad7109ac67894f6e /common/main.c
parent6a7073e5f262db9a4578ff00b5b28e34335564ce (diff)
downloadkmi-bc600ecc3bdf0f189861dfb840f70c2339a7a853.tar.gz
kmi-bc600ecc3bdf0f189861dfb840f70c2339a7a853.zip
rename common to src
+ I keep starting to type src and wondering why autocomplete won't work, I guess src is just uncounciously a better name
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/common/main.c b/common/main.c
deleted file mode 100644
index 4647fed..0000000
--- a/common/main.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* SPDX-License-Identifier: copyleft-next-0.3.1 */
-/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */
-
-/**
- * @file main.c
- * Entry point for actual kernel setup.
- */
-
-#include <kmi/mem_nodes.h>
-#include <kmi/initrd.h>
-#include <kmi/timer.h>
-#include <kmi/attrs.h>
-#include <kmi/proc.h>
-#include <kmi/debug.h>
-#include <kmi/vmem.h>
-#include <kmi/irq.h>
-#include <arch/arch.h>
-#include <arch/proc.h>
-#include <arch/smp.h>
-#include <libfdt.h>
-
-/**
- * Boot entry of kernel actual.
- *
- * Sets up all kernel subsystems and jumps into \c init program, does not
- * return.
- *
- * @param fdt Global FDT pointer in physical memory.
- * @param ram_base RAM base.
- * @return Should not.
- */
-void __main main(void *fdt, uintptr_t ram_base)
-{
- set_ram_base(ram_base);
-
- /* convert physical address to virtual address */
- fdt = __va(fdt);
-
- /* dbg uses direct mapping at this point */
- init_dbg(fdt);
- setup_dmap_dbg();
- dbg_fdt(fdt);
-
- setup_arch(fdt);
-
- init_pmem(fdt);
- /* setup temporary virtual memory */
- struct vmem *b = init_vmem(fdt);
-
- /* start up debugging in kernel IO */
- setup_io_dbg(b);
-
- init_irq(fdt);
- init_timer(fdt);
- init_proc(fdt);
-
- /* try to bring up other cores on system */
- smp_bringup(b, fdt);
-
- /* start running init program */
- void *initrd = (void *)get_initrdbase(fdt);
- run_init(cur_tcb(), fdt, initrd);
-}