Function called by the bootloader via _start entry point declared in entry_point! above Inputs BootInfo Bootloader memory mapping information
(boot_info: &'static BootInfo)
| 72 | /// BootInfo Bootloader memory mapping information |
| 73 | /// |
| 74 | fn kernel_entry(boot_info: &'static BootInfo) -> ! { |
| 75 | kernel::init(); |
| 76 | |
| 77 | // Set up memory and kernel heap with allocator |
| 78 | memory::init(boot_info); |
| 79 | |
| 80 | // Set up system calls |
| 81 | syscalls::init(); |
| 82 | |
| 83 | #[cfg(test)] |
| 84 | test_main(); |
| 85 | |
| 86 | // Launch the main kernel thread |
| 87 | // which will be scheduled and take over from here |
| 88 | process::new_kernel_thread(kernel_thread_main, Vec::new()); |
| 89 | |
| 90 | kernel::hlt_loop(); |
| 91 | } |
| 92 | |
| 93 | /// This function is called on panic. |
| 94 | #[cfg(not(test))] // If not in QEMU test mode |
nothing calls this directly
no test coverage detected