1 use system_error::SystemError; 2 3 use crate::arch::CurrentIrqArch; 4 5 use super::{dummychip::dummy_chip_init, irqdesc::early_irq_init, InterruptArch}; 6 7 /// 初始化中断 8 #[inline(never)] 9 pub fn irq_init() -> Result<(), SystemError> { 10 // todo: 通用初始化 11 12 dummy_chip_init(); 13 early_irq_init().expect("early_irq_init failed"); 14 15 // 初始化架构相关的中断 16 unsafe { CurrentIrqArch::arch_irq_init() }?; 17 return Ok(()); 18 } 19