aboutsummaryrefslogtreecommitdiffstats
path: root/src/hw/virtio-pci.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-06-30 09:53:03 +0200
committerGerd Hoffmann <kraxel@redhat.com>2015-07-01 16:35:50 +0200
commitfb752e19ce4fb037c3752f9dc380c6b61c20ed50 (patch)
tree091ba04e69ec8f704deb62e0629a2ec9b5227de5 /src/hw/virtio-pci.h
parent71acef8bb329dcd908e572cfd09fa683eada630b (diff)
downloadseabios-fb752e19ce4fb037c3752f9dc380c6b61c20ed50.tar.gz
virtio: legacy cleanup
Now that all code is switched over to use vp_read/write we can drop the ioaddr field from vp_device and the offset #defines. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'src/hw/virtio-pci.h')
-rw-r--r--src/hw/virtio-pci.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/hw/virtio-pci.h b/src/hw/virtio-pci.h
index 08267ad4..b11c3555 100644
--- a/src/hw/virtio-pci.h
+++ b/src/hw/virtio-pci.h
@@ -4,39 +4,9 @@
#include "x86.h" // inl
#include "biosvar.h" // GET_LOWFLAT
-/* A 32-bit r/o bitmask of the features supported by the host */
-#define VIRTIO_PCI_HOST_FEATURES 0
-
-/* A 32-bit r/w bitmask of features activated by the guest */
-#define VIRTIO_PCI_GUEST_FEATURES 4
-
-/* A 32-bit r/w PFN for the currently selected queue */
-#define VIRTIO_PCI_QUEUE_PFN 8
-
-/* A 16-bit r/o queue size for the currently selected queue */
-#define VIRTIO_PCI_QUEUE_NUM 12
-
-/* A 16-bit r/w queue selector */
-#define VIRTIO_PCI_QUEUE_SEL 14
-
-/* A 16-bit r/w queue notifier */
-#define VIRTIO_PCI_QUEUE_NOTIFY 16
-
-/* An 8-bit device status register. */
-#define VIRTIO_PCI_STATUS 18
-
-/* An 8-bit r/o interrupt status register. Reading the value will return the
- * current contents of the ISR and will also clear it. This is effectively
- * a read-and-acknowledge. */
-#define VIRTIO_PCI_ISR 19
-
/* The bit of the ISR which indicates a device configuration change. */
#define VIRTIO_PCI_ISR_CONFIG 0x2
-/* The remaining space is defined by each driver as the per-driver
- * configuration space */
-#define VIRTIO_PCI_CONFIG 20
-
/* Virtio ABI version, this must match exactly */
#define VIRTIO_PCI_ABI_VERSION 0
@@ -123,7 +93,6 @@ struct vp_cap {
};
struct vp_device {
- unsigned int ioaddr;
struct vp_cap common, notify, isr, device, legacy;
u32 notify_off_multiplier;
u8 use_modern;
@@ -225,7 +194,7 @@ static inline void vp_get_legacy(struct vp_device *vp, unsigned offset,
unsigned i;
for (i = 0; i < len; i++)
- ptr[i] = inb(vp->ioaddr + VIRTIO_PCI_CONFIG + offset + i);
+ ptr[i] = vp_read(&vp->legacy, virtio_pci_legacy, device[i]);
}
u8 vp_get_status(struct vp_device *vp);