diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-03-12 03:00:30 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-04-06 13:04:03 +0200 |
commit | 235be6a0f197d6c103615ae2bf7b329ece890da1 (patch) | |
tree | 38ed6fe5cd3b2257458a392397f568b3e9dd1d79 | |
parent | bc8fde6f62fd038e709b4981babda0f7c7ba8418 (diff) | |
download | edk2-platforms-235be6a0f197d6c103615ae2bf7b329ece890da1.tar.xz |
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() member
This function was never consumed by drivers, and the current prototype is
unsupportable with virtio-1.0. Remove the function from the protocol
definition, and drop the current (unused) implementations.
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>
7 files changed, 0 insertions, 77 deletions
diff --git a/OvmfPkg/Include/Protocol/VirtioDevice.h b/OvmfPkg/Include/Protocol/VirtioDevice.h index 15750f450c..f8afa7120a 100644 --- a/OvmfPkg/Include/Protocol/VirtioDevice.h +++ b/OvmfPkg/Include/Protocol/VirtioDevice.h @@ -127,27 +127,6 @@ EFI_STATUS );
/**
- Read the queue address field from the Virtio Header.
-
- QueueAddress is the address of the virtqueue divided by 4096.
-
- @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
-
- @param[out] QueueAddress The 32-bit queue address field.
-
- @retval EFI_SUCCESS The data was read successfully.
- @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
- provided address offset and read size.
- @retval EFI_INVALID_PARAMETER QueueAddress is NULL
-**/
-typedef
-EFI_STATUS
-(EFIAPI *VIRTIO_GET_QUEUE_ADDRESS) (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- );
-
-/**
Write the queue address field in the Virtio Header.
The parameter Address must be the base address of the virtqueue divided
@@ -356,7 +335,6 @@ struct _VIRTIO_DEVICE_PROTOCOL { VIRTIO_GET_DEVICE_FEATURES GetDeviceFeatures;
VIRTIO_SET_GUEST_FEATURES SetGuestFeatures;
- VIRTIO_GET_QUEUE_ADDRESS GetQueueAddress;
VIRTIO_SET_QUEUE_ADDRESS SetQueueAddress;
VIRTIO_SET_QUEUE_SEL SetQueueSel;
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c index 4af9dd0ac2..b1d443ea70 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c @@ -25,7 +25,6 @@ static VIRTIO_DEVICE_PROTOCOL mMmioDeviceProtocolTemplate = { 0, // SubSystemDeviceId
VirtioMmioGetDeviceFeatures, // GetDeviceFeatures
VirtioMmioSetGuestFeatures, // SetGuestFeatures
- VirtioMmioGetQueueAddress, // GetQueueAddress
VirtioMmioSetQueueAddress, // SetQueueAddress
VirtioMmioSetQueueSel, // SetQueueSel
VirtioMmioSetQueueNotify, // SetQueueNotify
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h index d445c3dc19..3b1e90ba9f 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h @@ -70,13 +70,6 @@ VirtioMmioGetDeviceFeatures ( EFI_STATUS
EFIAPI
-VirtioMmioGetQueueAddress (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- );
-
-EFI_STATUS
-EFIAPI
VirtioMmioGetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT16 *QueueNumMax
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c index 4b7d293283..2cd293ab88 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c @@ -40,26 +40,6 @@ VirtioMmioGetDeviceFeatures ( EFI_STATUS
EFIAPI
-VirtioMmioGetQueueAddress (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- )
-{
- VIRTIO_MMIO_DEVICE *Device;
-
- if (QueueAddress == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- Device = VIRTIO_MMIO_DEVICE_FROM_VIRTIO_DEVICE (This);
-
- *QueueAddress = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_QUEUE_PFN);
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
VirtioMmioGetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT16 *QueueNumMax
diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c index 2647bd3918..25b06fcfd5 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c @@ -30,7 +30,6 @@ STATIC VIRTIO_DEVICE_PROTOCOL mDeviceProtocolTemplate = { 0, // SubSystemDeviceId
VirtioPciGetDeviceFeatures, // GetDeviceFeatures
VirtioPciSetGuestFeatures, // SetGuestFeatures
- VirtioPciGetQueueAddress, // GetQueueAddress
VirtioPciSetQueueAddress, // SetQueueAddress
VirtioPciSetQueueSel, // SetQueueSel
VirtioPciSetQueueNotify, // SetQueueNotify
diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h index 812061dc0c..95f82611e2 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h @@ -88,13 +88,6 @@ VirtioPciGetDeviceFeatures ( EFI_STATUS
EFIAPI
-VirtioPciGetQueueAddress (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- );
-
-EFI_STATUS
-EFIAPI
VirtioPciGetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT16 *QueueNumMax
diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c index d8d30f9af6..4ba37a2d1c 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c @@ -124,25 +124,6 @@ VirtioPciGetDeviceFeatures ( EFI_STATUS
EFIAPI
-VirtioPciGetQueueAddress (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- )
-{
- VIRTIO_PCI_DEVICE *Dev;
-
- if (QueueAddress == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
-
- return VirtioPciIoRead (Dev, VIRTIO_PCI_OFFSET_QUEUE_ADDRESS, sizeof (UINT32),
- sizeof (UINT32), QueueAddress);
-}
-
-EFI_STATUS
-EFIAPI
VirtioPciGetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT16 *QueueNumMax
|