Commit Graph

5 Commits

Author SHA1 Message Date
Yongrong Wang 1b24139020 virtio-pci/mmio: Features change to 64 bit in all virtio_dispatch and fix compile warning
virtio/virtio-pci-legacy.c:399:48: warning: passing argument 2 of ‘pci_bus_write_io_dword’ makes integer from pointer without a cast [-Wint-con>
  399 |   pci_write_io_dword(vpdev->dev, vpdev->ioaddr + VIRTIO_PCI_GUEST_FEATURES,
      |                                                ^
      |                                                |
      |                                                void *
/home/wyr/work/code/project/vela/nuttx/include/nuttx/pci/pci.h:559:65: note: expected ‘uintptr_t’ {aka ‘long unsigned int’} but argument is of >
  559 | int pci_bus_write_io_dword(FAR struct pci_bus_s *bus, uintptr_t where,
      |                                                       ~~~~~~~~~~^~~~~

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong 5aeb644bc5 virtio: adapt to the new OpenAMP
Sync all the virtio api usage to sync with new OpenAMP

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong b0d70b76cb virtio-pci.c: polling mode support
1. Some platforms do not support interrupt mode (PCI_MSI/MSIX),
so add polling mode support, so these platforms can also use virtio-pci;
2. In some cases, we do not want to use the interrupt for virtio driver
to avoid time jitter, so add the polling mode support;
3. If CONFIG_DRIVERS_VIRTIO_PCI_POLLING_PERIOD <= 0, interrupt mode.
   if CONFIG_DRIVERS_VIRTIO_PCI_POLLING_PERIOD > 0, polling mode.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-15 02:22:16 +08:00
wangyongrong ee6bc2e7df virtio-pci: extract common part of virtio pci modern and leagcy
Extrace common part of virtio pci modern and legacy to virtio-pci to
reduce the duplicated code.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-15 02:22:16 +08:00
wangyongrong d54d07b62c virtio-pci: add virtio pci legacy support
Follow the virtio spec, support the virtio pci Legacy

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
Signed-off-by: andi <andi6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-15 02:22:16 +08:00