$NetBSD: virtio_mmio.4,v 1.2 2025/01/15 13:31:07 wiz Exp $ Copyright (c) 2024 The NetBSD Foundation, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..Dd January 15, 2025
.Dt VIRTIO_MMIO 4
.Os
.Sh NAME
.Nm virtio_mmio
.Nd VirtIO over memory mapped device
.Sh SYNOPSIS
.Cd "pv* at pvbus?"
.Cd "virtio* at pv?"
p
.Cd "acpi0 at mainbus0"
.Cd "virtio* at acpi?"
.Sh DESCRIPTION
.Nm
can be used in virtual environments without
.Xr pci 4
support
q a common situation in embedded devices models
might use simple memory mapped device
q Nm
instead of the
.Xr pci 4
device.
p
The memory mapped
.Xr virtio 4
device behavior is based on the
.Xr pci 4
device specification.
Therefore most operations including device initialization,
queues configuration and buffer transfers are nearly identical.
p
Unlike
.Xr pci 4 ,
.Nm
provides no generic device discovery mechanism.
For each device, the guest OS will
need to know the location of the registers and interrupt(s) used.
p
Device location can be read from either
.Xr acpi 4
or via kernel command line parameters, implemented as a
.Xr pv 4
virtual device.
.Sh SEE ALSO
.Xr virtio 4
p
.Rs
.%T Virtual I/O Device (VIRTIO) Version 1.2
.%U https://docs.oasis-open.org/virtio/virtio/v1.2/virtio-v1.2.html
.Re