xref: /DragonOS/kernel/src/arch/riscv64/cpu.rs (revision e28411791f090c421fe4b6fa5956fb1bd362a8d9)
1 use crate::smp::cpu::ProcessorId;
2 
3 /// 获取当前cpu的id
4 #[inline]
5 pub fn current_cpu_id() -> ProcessorId {
6     unimplemented!("RiscV64 current_cpu_id")
7 }
8 
9 /// 重置cpu
10 pub unsafe fn cpu_reset() -> ! {
11     sbi_rt::system_reset(sbi_rt::WarmReboot, sbi_rt::NoReason);
12     unimplemented!("RiscV64 reset failed, manual override expected ...")
13 }
14