1 use core::intrinsics::unreachable; 2 3 use crate::{init::init_before_mem_init, kinfo, mm::PhysAddr}; 4 5 #[no_mangle] 6 unsafe extern "C" fn kernel_main(hartid: usize, fdt_paddr: usize) -> ! { 7 let fdt_paddr = PhysAddr::new(fdt_paddr); 8 init_before_mem_init(); 9 kinfo!( 10 "DragonOS kernel is running on hart {}, fdt address:{:?}", 11 hartid, 12 fdt_paddr 13 ); 14 loop {} 15 unreachable() 16 } 17