ableos/ableos/src/devices/pci/mod.rs

29 lines
691 B
Rust
Raw Normal View History

2022-08-12 13:40:23 +00:00
/*
* Copyright (c) 2022, Umut İnan Erdoğan <umutinanerdogan@pm.me>
*
* SPDX-License-Identifier: MPL-2.0
*/
pub mod class;
pub mod device;
2022-08-06 11:48:40 +00:00
pub mod vendors;
2022-04-25 18:39:39 +00:00
2022-08-08 19:55:28 +00:00
// MassStorage_IDE (0x0101)
pub mod piix;
2022-08-12 13:40:23 +00:00
pub use class::*;
pub use device::*;
2022-04-25 18:39:39 +00:00
2022-08-12 13:40:23 +00:00
/// Enumerate PCI devices and run initialisation routines on ones we support
pub fn init() {
for bus in 0..=255 {
for device in 0..32 {
if let Some(device_info) = device::check_device(bus, device) {
if !device::check_pci_support(device_info.device_id) {
trace!("PCI device {} on bus {} unsupported", device_info.device, device_info.bus)
2022-04-25 18:39:39 +00:00
}
}
}
}
}