mirror of
https://github.com/apache/nuttx.git
synced 2026-08-06 21:19:03 +00:00
In the source code of qemu or linux, there is a check for the virtio version
/* Check device version */
priv->version = readl(priv->base + VIRTIO_MMIO_VERSION);
if (priv->version < 1 || priv->version > 2) {
debug("(%s): version %d not supported!\n",
udev->name, priv->version);
return 0;
}
/* Check device ID */
uc_priv->device = readl(priv->base + VIRTIO_MMIO_DEVICE_ID);
if (uc_priv->device == 0) {
/*
* virtio-mmio device with an ID 0 is a (dummy) placeholder
* with no function. End probing now with no error reported.
*/
return 0;
}
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||
| virtio-blk.c | ||
| virtio-blk.h | ||
| virtio-gpu.c | ||
| virtio-gpu.h | ||
| virtio-input.c | ||
| virtio-input.h | ||
| virtio-mmio.c | ||
| virtio-net.c | ||
| virtio-net.h | ||
| virtio-pci-legacy.c | ||
| virtio-pci-modern.c | ||
| virtio-pci.c | ||
| virtio-pci.h | ||
| virtio-rng.c | ||
| virtio-rng.h | ||
| virtio-rpmb.c | ||
| virtio-rpmb.h | ||
| virtio-serial.c | ||
| virtio-serial.h | ||
| virtio-snd.c | ||
| virtio-snd.h | ||
| virtio.c | ||