pub struct Serial16550 { /* private fields */ }
Expand description
A 16550 serial port emulator.
Implementations§
Source§impl Serial16550
impl Serial16550
Sourcepub fn new(
debug_name: String,
base: MmioOrIoPort,
register_width: u8,
interrupt: LineInterrupt,
io: Box<dyn SerialIo>,
wait_for_rts: bool,
) -> Result<Self, ConfigurationError>
pub fn new( debug_name: String, base: MmioOrIoPort, register_width: u8, interrupt: LineInterrupt, io: Box<dyn SerialIo>, wait_for_rts: bool, ) -> Result<Self, ConfigurationError>
Returns a new emulator instance.
debug_name
is used to improve tracing statements. base
is the base
IO port and will be used for an IO region spanning 8 bytes.
Trait Implementations§
Source§impl ChangeDeviceState for Serial16550
impl ChangeDeviceState for Serial16550
Source§impl ChipsetDevice for Serial16550
impl ChipsetDevice for Serial16550
Source§fn supports_pio(&mut self) -> Option<&mut dyn PortIoIntercept>
fn supports_pio(&mut self) -> Option<&mut dyn PortIoIntercept>
Optionally returns a trait object to send IO port intercepts to.
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.
Source§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_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_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.
Source§impl InspectMut for Serial16550
impl InspectMut for Serial16550
Source§fn inspect_mut(&mut self, req: Request<'_>)
fn inspect_mut(&mut self, req: Request<'_>)
Inspects the object.
Source§impl MmioIntercept for Serial16550
impl MmioIntercept for Serial16550
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.
Source§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 PollDevice for Serial16550
impl PollDevice for Serial16550
Source§fn poll_device(&mut self, cx: &mut Context<'_>)
fn poll_device(&mut self, cx: &mut Context<'_>)
Poll the device for asynchronous work. Read more
Source§impl PortIoIntercept for Serial16550
impl PortIoIntercept for Serial16550
Source§fn io_read(&mut self, io_port: u16, data: &mut [u8]) -> IoResult
fn io_read(&mut self, io_port: u16, data: &mut [u8]) -> IoResult
Dispatch an IO port read to the device with the given address.
Source§fn io_write(&mut self, io_port: u16, data: &[u8]) -> IoResult
fn io_write(&mut self, io_port: u16, data: &[u8]) -> IoResult
Dispatch an IO port write to the device with the given address.
Source§fn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u16>)]
fn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u16>)]
Report a set of static io port regions (region_name, port_range) that
cannot be remapped at runtime and are always registered. Read more
Source§impl SaveRestore for Serial16550
impl SaveRestore for Serial16550
Auto Trait Implementations§
impl Freeze for Serial16550
impl !RefUnwindSafe for Serial16550
impl Send for Serial16550
impl !Sync for Serial16550
impl Unpin for Serial16550
impl !UnwindSafe for Serial16550
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