|
AquilaOS documentation
How it works, and its code
|
The kernel's generic entry point, kmain(). More...
#include <core/printk.h>#include <core/panic.h>#include <core/string.h>#include <core/module.h>#include <core/kargs.h>#include <core/arch.h>#include <mm/mm.h>#include <mm/pmap.h>#include <mm/vm.h>#include <dev/dev.h>#include <fs/vfs.h>#include <fs/initramfs.h>#include <sys/proc.h>#include <sys/sched.h>#include <sys/binfmt.h>#include <boot/boot.h>#include <console/earlycon.h>#include <ds/hashmap.h>Go to the source code of this file.
Functions | |
| void | kmain (struct boot *boot) |
| Starts the kernel's generic part, once the architecture has set up the CPU, memory and the platform. | |
The kernel's generic entry point, kmain().
The architecture's boot code sets up the CPU and memory, then calls kmain(), which sets up the devices and filesystems, mounts the root filesystem, and starts the first process, /init. See docs/kernel/booting.md.
Definition in file main.c.
| void kmain | ( | struct boot * | boot | ) |
Starts the kernel's generic part, once the architecture has set up the CPU, memory and the platform.
It mounts the root filesystem and runs /init, and doesn't return.
| boot | what the boot loader passed: the memory map, the modules, the command line |
Definition at line 38 of file main.c.
References arch_proc_init(), binfmt_load(), module_t::cmdline, curproc, curthread, DEV, earlycon_disable(), queue::head, init_execve(), initproc, kargs_get(), kdev_init(), kmain(), kvmem_guardtest(), kvmem_selftest(), load_ramdisk(), boot::modules, boot::modules_count, modules_init(), NULL, panic, vm_space::pmap, pmap_switch(), printk(), proc_new(), sched_init_spawn(), proc::threads, qnode::value, vfs_init(), vfs_mknod(), vfs_mount(), vfs_mount_root_dev(), and proc::vm_space.
Referenced by aarch64_init(), kmain(), and x86_cpu_init().