diff --git a/lib/include/openamp/virtqueue.h b/lib/include/openamp/virtqueue.h index 1a9d2e8fe..819439871 100644 --- a/lib/include/openamp/virtqueue.h +++ b/lib/include/openamp/virtqueue.h @@ -114,10 +114,10 @@ struct virtqueue { uint16_t vq_queued_cnt; /** - * Metal I/O region of the vrings and buffers. + * Metal I/O region of the buffers. * This structure is used for conversion between virtual and physical addresses. */ - void *shm_io; + struct metal_io_region *shm_io; /** * Head of the free chain in the descriptor table. If there are no free descriptors, diff --git a/lib/virtio_mmio/virtio_mmio_drv.c b/lib/virtio_mmio/virtio_mmio_drv.c index 5f42180a6..570047183 100644 --- a/lib/virtio_mmio/virtio_mmio_drv.c +++ b/lib/virtio_mmio/virtio_mmio_drv.c @@ -325,7 +325,7 @@ struct virtqueue *virtio_mmio_setup_virtqueue(struct virtio_device *vdev, virtio_mmio_write32(vdev, VIRTIO_MMIO_QUEUE_NUM, vq->vq_nentries); virtio_mmio_write32(vdev, VIRTIO_MMIO_QUEUE_ALIGN, 4096); virtio_mmio_write32(vdev, VIRTIO_MMIO_QUEUE_PFN, - ((uintptr_t)metal_io_virt_to_phys(vq->shm_io, + ((uintptr_t)metal_io_virt_to_phys(vmdev->shm_io, (char *)vq->vq_ring.desc)) / 4096); vdev->vrings_info[vdev->vrings_num].vq = vq;