pub struct GenericPcieRootComplex { /* private fields */ }Expand description
A generic PCI Express root complex emulator.
Implementations§
Source§impl GenericPcieRootComplex
impl GenericPcieRootComplex
Sourcepub fn new(
register_mmio: &mut dyn RegisterMmioIntercept,
start_bus: u8,
end_bus: u8,
ecam_range: MemoryRange,
ports: Vec<GenericPcieRootPortDefinition>,
) -> Self
pub fn new( register_mmio: &mut dyn RegisterMmioIntercept, start_bus: u8, end_bus: u8, ecam_range: MemoryRange, ports: Vec<GenericPcieRootPortDefinition>, ) -> Self
Constructs a new GenericPcieRootComplex emulator.
Sourcepub fn add_pcie_device(
&mut self,
port: u8,
name: impl AsRef<str>,
dev: Box<dyn GenericPciBusDevice>,
) -> Result<(), Arc<str>>
pub fn add_pcie_device( &mut self, port: u8, name: impl AsRef<str>, dev: Box<dyn GenericPciBusDevice>, ) -> Result<(), Arc<str>>
Attach the provided GenericPciBusDevice to the port identified.
Trait Implementations§
Source§impl ChangeDeviceState for GenericPcieRootComplex
impl ChangeDeviceState for GenericPcieRootComplex
Source§impl ChipsetDevice for GenericPcieRootComplex
impl ChipsetDevice for GenericPcieRootComplex
Source§fn supports_mmio(&mut self) -> Option<&mut dyn MmioIntercept>
fn supports_mmio(&mut self) -> Option<&mut dyn MmioIntercept>
Optionally returns a trait object to send MMIO port intercepts to.
§fn supports_pio(&mut self) -> Option<&mut (dyn PortIoIntercept + 'static)>
fn supports_pio(&mut self) -> Option<&mut (dyn PortIoIntercept + 'static)>
Optionally returns a trait object to send IO port intercepts to.
§fn supports_pci(&mut self) -> Option<&mut (dyn PciConfigSpace + 'static)>
fn supports_pci(&mut self) -> Option<&mut (dyn PciConfigSpace + 'static)>
Optionally returns a trait object to send PCI config space accesses to.
§fn supports_poll_device(&mut self) -> Option<&mut dyn PollDevice>
fn supports_poll_device(&mut self) -> Option<&mut dyn PollDevice>
Optionally returns a trait object to send poll requests to.
§fn supports_line_interrupt_target(
&mut self,
) -> Option<&mut dyn LineInterruptTarget>
fn supports_line_interrupt_target( &mut self, ) -> Option<&mut dyn LineInterruptTarget>
Optionally returns a trait object to send interrupt line changes to.
§fn supports_handle_eoi(&mut self) -> Option<&mut dyn HandleEoi>
fn supports_handle_eoi(&mut self) -> Option<&mut dyn HandleEoi>
Optionally returns a trait object to send EOI requests to.
§fn supports_acknowledge_pic_interrupt(
&mut self,
) -> Option<&mut dyn AcknowledgePicInterrupt>
fn supports_acknowledge_pic_interrupt( &mut self, ) -> Option<&mut dyn AcknowledgePicInterrupt>
Optionally returns a trait object with which to acknowledge PIC
interrupts.
§fn supports_tdisp(&mut self) -> Option<&mut dyn TdispHostDeviceTarget>
fn supports_tdisp(&mut self) -> Option<&mut dyn TdispHostDeviceTarget>
Optionally returns a trait object which implements TDISP host
communication.
Source§impl InspectMut for GenericPcieRootComplex
impl InspectMut for GenericPcieRootComplex
Source§fn inspect_mut(&mut self, req: Request<'_>)
fn inspect_mut(&mut self, req: Request<'_>)
Inspects the object.
Source§impl MmioIntercept for GenericPcieRootComplex
impl MmioIntercept for GenericPcieRootComplex
Source§fn mmio_read(&mut self, addr: u64, data: &mut [u8]) -> IoResult
fn mmio_read(&mut self, addr: u64, data: &mut [u8]) -> IoResult
Dispatch an MMIO read to the device with the given address.
Source§fn mmio_write(&mut self, addr: u64, data: &[u8]) -> IoResult
fn mmio_write(&mut self, addr: u64, data: &[u8]) -> IoResult
Dispatch an MMIO write to the device with the given address.
§fn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u64>)]
fn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u64>)]
Report a set of static static mmio regions (region_name, gpa_range) that
cannot be remapped at runtime and are always registered. Read more
Source§impl SaveRestore for GenericPcieRootComplex
impl SaveRestore for GenericPcieRootComplex
Auto Trait Implementations§
impl Freeze for GenericPcieRootComplex
impl !RefUnwindSafe for GenericPcieRootComplex
impl Send for GenericPcieRootComplex
impl !Sync for GenericPcieRootComplex
impl Unpin for GenericPcieRootComplex
impl !UnwindSafe for GenericPcieRootComplex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more