1 use crate::driver::input::serio::serio_bus_init; 2 use system_error::SystemError; 3 4 use super::{ 5 class::classes_init, 6 cpu::cpu_device_manager, 7 device::{bus::buses_init, init::devices_init}, 8 firmware::firmware_init, 9 hypervisor::hypervisor_init, 10 platform::platform_bus_init, 11 }; 12 13 pub(super) fn driver_init() -> Result<(), SystemError> { 14 devices_init()?; 15 buses_init()?; 16 classes_init()?; 17 firmware_init()?; 18 hypervisor_init()?; 19 platform_bus_init()?; 20 serio_bus_init()?; 21 cpu_device_manager().init()?; 22 23 // 至此,已完成设备驱动模型的初始化 24 // 接下来,初始化设备 25 actual_device_init()?; 26 return Ok(()); 27 } 28 29 fn actual_device_init() -> Result<(), SystemError> { 30 // 应当使用unified_init来初始化 31 return Ok(()); 32 } 33