summaryrefslogtreecommitdiff
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-03-12 00:58:12 +0100
committerLaszlo Ersek <lersek@redhat.com>2016-04-06 13:04:03 +0200
commitbc8fde6f62fd038e709b4981babda0f7c7ba8418 (patch)
tree16012df7cc821c7a8c01e4f417a3cac46562ea97 /OvmfPkg/Include
parentb1bb6f5961d82f30046e39e187a80556250f2bd1 (diff)
downloadedk2-bc8fde6f62fd038e709b4981babda0f7c7ba8418.tar.gz
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: widen the Features bitmap to 64 bits
The virtio-1.0 spec widens the Features bitmap to 64 bits. Modify the declarations of the GetDeviceFeatures() and SetGuestFeatures() protocol member functions accordingly. Normally, a protocol cannot be changed in incompatible ways if the GUID stays the same; however, we've always been extremely clear that VIRTIO_DEVICE_PROTOCOL is internal to edk2. See for example the top of "OvmfPkg/Include/Protocol/VirtioDevice.h". In this patch, all producers and consumers of the GetDeviceFeatures() and SetGuestFeatures() protocol members are updated. The drivers that currently produce these members are "legacy" drivers (in virtio-1.0 terminology), and they cannot (and will not) handle feature bits above BIT31. Therefore their conversion is only for compatibility with the modified protocol interface. The consumers will be responsible for checking the VIRTIO_DEVICE_PROTOCOL.Revision field, and for not passing feature bits that these backends cannot handle. The VirtioMmioGetDeviceFeatures() implementation stores the result of an MmioRead32() call with normal assignment, so it needs no change beyond adapting its prototype. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/Protocol/VirtioDevice.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/OvmfPkg/Include/Protocol/VirtioDevice.h b/OvmfPkg/Include/Protocol/VirtioDevice.h
index 48fca2e14..15750f450 100644
--- a/OvmfPkg/Include/Protocol/VirtioDevice.h
+++ b/OvmfPkg/Include/Protocol/VirtioDevice.h
@@ -97,7 +97,7 @@ EFI_STATUS
@param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
- @param[out] DeviceFeatures The 32-bit device features field.
+ @param[out] DeviceFeatures The device features field.
@retval EFI_SUCCESS The data was read successfully.
@retval EFI_UNSUPPORTED The underlying IO device doesn't support the
@@ -108,7 +108,7 @@ typedef
EFI_STATUS
(EFIAPI *VIRTIO_GET_DEVICE_FEATURES) (
IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *DeviceFeatures
+ OUT UINT64 *DeviceFeatures
);
/**
@@ -116,14 +116,14 @@ EFI_STATUS
@param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
- @param[in] Features The 32-bit guest guest features field
+ @param[in] Features The guest features field
**/
typedef
EFI_STATUS
(EFIAPI *VIRTIO_SET_GUEST_FEATURES) (
IN VIRTIO_DEVICE_PROTOCOL *This,
- IN UINT32 Features
+ IN UINT64 Features
);
/**