class PciLegacyBackend

Defined at line 112 of file ../../src/devices/bus/lib/virtio/include/lib/virtio/backends/pci.h

PciLegacyBackend corresponds to the Virtio Legacy interface utilizing port IO

and the IO Bar 0. It has additional complications around offsets and

configuration structures when MSI-X is enabled.

Public Methods

zx_status_t Init ()

Defined at line 74 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void PciLegacyBackend (fidl::ClientEnd<fuchsia_hardware_pci::Device> pci, fuchsia_hardware_pci::DeviceInfo info)

Defined at line 114 of file ../../src/devices/bus/lib/virtio/include/lib/virtio/backends/pci.h

void PciLegacyBackend (fidl::ClientEnd<fuchsia_hardware_pci::Device> pci, fuchsia_hardware_pci::DeviceInfo info, LegacyIoInterface * interface)

Defined at line 117 of file ../../src/devices/bus/lib/virtio/include/lib/virtio/backends/pci.h

void PciLegacyBackend (const PciLegacyBackend & )

Defined at line 120 of file ../../src/devices/bus/lib/virtio/include/lib/virtio/backends/pci.h

PciLegacyBackend & operator= (const PciLegacyBackend & )

Defined at line 121 of file ../../src/devices/bus/lib/virtio/include/lib/virtio/backends/pci.h

void ~PciLegacyBackend ()

Defined at line 122 of file ../../src/devices/bus/lib/virtio/include/lib/virtio/backends/pci.h

void DriverStatusOk ()

Defined at line 274 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void DriverStatusAck ()

Defined at line 269 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void DeviceReset ()

Defined at line 247 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void WaitForDeviceReset ()

Defined at line 253 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

uint32_t IsrStatus ()

Defined at line 279 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

uint64_t ReadFeatures ()

Defined at line 224 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void SetFeatures (uint64_t bitmap)

Defined at line 232 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

zx_status_t ConfirmFeatures ()

Virtio v0.9.5 does not support the FEATURES_OK negotiation so this should

always succeed.

Defined at line 245 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void ReadDeviceConfig (uint16_t offset, uint8_t * value)

These handle reading and writing a device's device config to allow derived

virtio devices to work with fields only they know about. For most virtio

devices they will have their device config copied over via

CopyDeviceConfig when device config interrupts are asserted and will not

need to call these directly.

Defined at line 132 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void ReadDeviceConfig (uint16_t offset, uint16_t * value)

Defined at line 137 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void ReadDeviceConfig (uint16_t offset, uint32_t * value)

Defined at line 142 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void ReadDeviceConfig (uint16_t offset, uint64_t * value)

Defined at line 147 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void WriteDeviceConfig (uint16_t offset, uint8_t value)

Defined at line 155 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void WriteDeviceConfig (uint16_t offset, uint16_t value)

Defined at line 160 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void WriteDeviceConfig (uint16_t offset, uint32_t value)

Defined at line 165 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void WriteDeviceConfig (uint16_t offset, uint64_t value)

Defined at line 169 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

uint16_t GetRingSize (uint16_t index)

Handle the virtio queues for the device. Due to configuration layouts changing

depending on backend this has to be handled by the backend itself.

Defined at line 178 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

zx_status_t SetRing (uint16_t index, uint16_t count, zx_paddr_t pa_desc, zx_paddr_t pa_avail, zx_paddr_t pa_used)

Set up ring descriptors with the backend.

Defined at line 188 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc

void RingKick (uint16_t ring_index)

Defined at line 218 of file ../../src/devices/bus/lib/virtio/backends/pci_legacy.cc