aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/virtio-pci.h
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2016-05-02 13:46:39 +0200
committerMichael Brown <mcb30@ipxe.org>2016-06-20 14:20:21 +0100
commitfbbc895442847b4d3baa05fe1be66b510c949381 (patch)
tree8445edcba9be2c8006f68fb0ae0a2e0b63c106e3 /src/include/ipxe/virtio-pci.h
parent25ae251dd918fd427e7e01d2befc0ac34aabcaa8 (diff)
downloadipxe-fbbc895442847b4d3baa05fe1be66b510c949381.tar.gz
[virtio] Renumber virtio_pci_region flags
Some of the regions may end up being unmapped, either because they are optional or because the attempt to map them has failed. Region types starting at 0 didn't make it easy to test for this condition. This commit bumps all valid region types up by 1 with 0 having the implicit 'unmapped' meaning. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/virtio-pci.h')
-rw-r--r--src/include/ipxe/virtio-pci.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/ipxe/virtio-pci.h b/src/include/ipxe/virtio-pci.h
index c7452c82f..f3c9b17ca 100644
--- a/src/include/ipxe/virtio-pci.h
+++ b/src/include/ipxe/virtio-pci.h
@@ -107,11 +107,11 @@ struct virtio_pci_region {
/* How to interpret the base field */
#define VIRTIO_PCI_REGION_TYPE_MASK 0x00000003
/* The base field is a memory address */
-#define VIRTIO_PCI_REGION_MEMORY 0x00000000
+#define VIRTIO_PCI_REGION_MEMORY 0x00000001
/* The base field is a port address */
-#define VIRTIO_PCI_REGION_PORT 0x00000001
+#define VIRTIO_PCI_REGION_PORT 0x00000002
/* The base field is an offset within the PCI bar */
-#define VIRTIO_PCI_REGION_PCI_CONFIG 0x00000002
+#define VIRTIO_PCI_REGION_PCI_CONFIG 0x00000003
unsigned flags;
};