xref: /DragonOS/kernel/src/driver/base/init.rs (revision fae6e9ade46a52976ad5d099643d51cc20876448)
1 use crate::driver::input::serio::serio_bus_init;
2 use system_error::SystemError;
3 
4 use super::{
5     class::classes_init,
6     cpu::CpuDeviceManager,
7     device::{bus::buses_init, init::devices_init},
8     firmware::firmware_init,
9     hypervisor::hypervisor_init,
10     platform::platform_bus_init,
11 };
12 
13 /// 初始化设备驱动模型
14 #[inline(never)]
driver_init() -> Result<(), SystemError>15 pub fn driver_init() -> Result<(), SystemError> {
16     devices_init()?;
17     buses_init()?;
18     classes_init()?;
19     firmware_init()?;
20     hypervisor_init()?;
21     platform_bus_init()?;
22     serio_bus_init()?;
23     CpuDeviceManager::init()?;
24 
25     // 至此,已完成设备驱动模型的初始化
26     return Ok(());
27 }
28