genode/repos/libports/src/lib/qemu-usb
Norman Feske b078224753 Replace Genode::strncpy by Genode::copy_cstring
- Since Genode::strncpy is not 100% compatible with the POSIX
  strncpy function, better use a distinct name.

- Remove bogus return value from the function, easing the potential
  enforcement of mandatory return-value checks later.

Fixes #3752
2020-05-27 11:56:45 +02:00
..
include qemu-usb: add isochronous packet support to XHCI 2018-08-02 14:36:46 +02:00
patches qemu-usb: add isochronous packet support to XHCI 2018-08-02 14:36:46 +02:00
README qemu-usb: xHCI model as library 2016-02-05 10:47:43 +01:00
dummies.cc Remove residual uses of deprecated APIs 2019-02-19 11:12:12 +01:00
files.list qemu-usb: xHCI model as library 2016-02-05 10:47:43 +01:00
host.cc Avoid use of deprecated Xml_node methods 2020-05-18 10:16:14 +02:00
qemu_emul.cc Replace Genode::strncpy by Genode::copy_cstring 2020-05-27 11:56:45 +02:00
symbol.map qemu-usb: xHCI model as library 2016-02-05 10:47:43 +01:00

README

This library makes the xHCI device model of Qemu available on Genode
and is used as a back end for such for device models in existing VMMs.

Usage
~~~~~

The user of this library is required to provide certain back end
functionality, namely a Timer_queue to handle timer events and a Pci_device
that handles access to the PCI bus (raise interrupts, (un)map DMA memory)
within the VMM device model.

To use this library the user calls 'Qemu::usb_init' and passes
pointers to the back end objects. In addition, a Signal_receiver
reference has also to be handed over. It will receive all signals
required by this library.

'Qemu::usb_init' returns a pointer to a Controller object. MMIO
access must be forwarded to this object when the device model in the VMM
wants to access the MMIO regions of the xHCI device.

Whenever the VMM requests a device reset the 'Qemu::usb_reset'
function has to be called. It will remove and free all attached
USB devices and will reset the state of the xHCI device model.

After the xHCI device model has been reset 'Qemu::usb_update_devices'
needs to be called to reattach USB devices.

Timer callbacks that have been registered using the Timer_queue
interface have to be executed by calling 'Qemu::usb_timer_callback'
when the timer triggers.