pub struct PciBus {
ecam_base: usize,
ecam_size: usize,
devices: Mutex<Vec<PciDeviceInfo>>,
}Expand description
PCI bus manager
Manages PCI device discovery and configuration space access.
Fields§
§ecam_base: usizeECAM (Enhanced Configuration Access Mechanism) base address
ecam_size: usizeECAM region size in bytes
devices: Mutex<Vec<PciDeviceInfo>>List of discovered PCI devices
Implementations§
Source§impl PciBus
impl PciBus
Sourcepub fn scan(&self)
pub fn scan(&self)
Scan the PCI bus and discover all devices
This is a convenience method that creates a scanner and performs the scan, storing discovered devices in the bus manager.
Sourcepub fn scan_and_register(&self)
pub fn scan_and_register(&self)
Scan the PCI bus and register devices with the DeviceManager
This scans for PCI devices and registers them with the global device manager so they can be matched with drivers.
Source§impl PciBus
impl PciBus
Sourcepub fn is_valid_address(&self, addr: &PciAddress) -> bool
pub fn is_valid_address(&self, addr: &PciAddress) -> bool
Check if a PCI address is within the ECAM region
Sourcepub fn devices(&self) -> Vec<PciDeviceInfo>
pub fn devices(&self) -> Vec<PciDeviceInfo>
Get the list of discovered devices
Sourcepub fn add_device(&self, device: PciDeviceInfo)
pub fn add_device(&self, device: PciDeviceInfo)
Add a device to the list of discovered devices