pub trait PcieDevice: Send {
Show 14 methods // Required methods fn get_device_id(&self) -> u16; fn debug_label(&self) -> String; fn allocate_address( &mut self, resources: &mut SystemAllocator ) -> Result<PciAddress, PciDeviceError>; fn read_config(&self, reg_idx: usize, data: &mut u32); fn write_config(&mut self, reg_idx: usize, offset: u64, data: &[u8]); fn handle_cap_write_result(&mut self, res: Box<dyn PciCapConfigWriteResult>); fn clone_interrupt(&mut self, msi_config: Arc<Mutex<MsiConfig>>); fn get_caps( &self ) -> Vec<(Box<dyn PciCapability>, Option<Box<dyn PciCapConfig>>)>; fn get_removed_devices(&self) -> Vec<PciAddress>; fn hotplug_implemented(&self) -> bool; fn hotplugged(&self) -> bool; fn get_bridge_window_size(&self) -> (u64, u64); // Provided methods fn preferred_address(&self) -> Option<PciAddress> { ... } fn get_bus_range(&self) -> Option<PciBridgeBusRange> { ... }
}

Required Methods§

source

fn get_device_id(&self) -> u16

source

fn debug_label(&self) -> String

source

fn allocate_address( &mut self, resources: &mut SystemAllocator ) -> Result<PciAddress, PciDeviceError>

source

fn read_config(&self, reg_idx: usize, data: &mut u32)

source

fn write_config(&mut self, reg_idx: usize, offset: u64, data: &[u8])

source

fn handle_cap_write_result(&mut self, res: Box<dyn PciCapConfigWriteResult>)

source

fn clone_interrupt(&mut self, msi_config: Arc<Mutex<MsiConfig>>)

source

fn get_caps( &self ) -> Vec<(Box<dyn PciCapability>, Option<Box<dyn PciCapConfig>>)>

source

fn get_removed_devices(&self) -> Vec<PciAddress>

source

fn hotplug_implemented(&self) -> bool

Hotplug capability is implemented on this bridge or not. Return true, the children pci devices could be connected through hotplug Return false, the children pci devices should be connected statically

source

fn hotplugged(&self) -> bool

This function returns true if this pcie device is hotplugged into the system

source

fn get_bridge_window_size(&self) -> (u64, u64)

Get bridge window size to cover children’s mmio size (u64, u64) -> (non_prefetchable window size, prefetchable_window_size)

Provided Methods§

Implementors§