]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() member
authorLaszlo Ersek <lersek@redhat.com>
Sat, 12 Mar 2016 02:00:30 +0000 (03:00 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 6 Apr 2016 11:04:03 +0000 (13:04 +0200)
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>
OvmfPkg/Include/Protocol/VirtioDevice.h
OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h
OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c
OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c
OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h
OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c

index 15750f450cb2497d831c6ce7aa1541029de1298f..f8afa7120a4c68724c2bc453cbbade350b64cf03 100644 (file)
@@ -126,27 +126,6 @@ EFI_STATUS
   IN UINT64                   Features\r
   );\r
 \r
   IN UINT64                   Features\r
   );\r
 \r
-/**\r
-  Read the queue address field from the Virtio Header.\r
-\r
-  QueueAddress is the address of the virtqueue divided by 4096.\r
-\r
-  @param[in] This                 This instance of VIRTIO_DEVICE_PROTOCOL\r
-\r
-  @param[out] QueueAddress        The 32-bit queue address field.\r
-\r
-  @retval EFI_SUCCESS             The data was read successfully.\r
-  @retval EFI_UNSUPPORTED         The underlying IO device doesn't support the\r
-                                  provided address offset and read size.\r
-  @retval EFI_INVALID_PARAMETER   QueueAddress is NULL\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *VIRTIO_GET_QUEUE_ADDRESS) (\r
-  IN  VIRTIO_DEVICE_PROTOCOL *This,\r
-  OUT UINT32                 *QueueAddress\r
-  );\r
-\r
 /**\r
   Write the queue address field in the Virtio Header.\r
 \r
 /**\r
   Write the queue address field in the Virtio Header.\r
 \r
@@ -356,7 +335,6 @@ struct _VIRTIO_DEVICE_PROTOCOL {
   VIRTIO_GET_DEVICE_FEATURES  GetDeviceFeatures;\r
   VIRTIO_SET_GUEST_FEATURES   SetGuestFeatures;\r
 \r
   VIRTIO_GET_DEVICE_FEATURES  GetDeviceFeatures;\r
   VIRTIO_SET_GUEST_FEATURES   SetGuestFeatures;\r
 \r
-  VIRTIO_GET_QUEUE_ADDRESS    GetQueueAddress;\r
   VIRTIO_SET_QUEUE_ADDRESS    SetQueueAddress;\r
 \r
   VIRTIO_SET_QUEUE_SEL        SetQueueSel;\r
   VIRTIO_SET_QUEUE_ADDRESS    SetQueueAddress;\r
 \r
   VIRTIO_SET_QUEUE_SEL        SetQueueSel;\r
index 4af9dd0ac2964874d5bb68f369967ac974545a8f..b1d443ea70070f6f29cf27754dd0b689be2de962 100644 (file)
@@ -25,7 +25,6 @@ static VIRTIO_DEVICE_PROTOCOL mMmioDeviceProtocolTemplate = {
     0,                                     // SubSystemDeviceId\r
     VirtioMmioGetDeviceFeatures,           // GetDeviceFeatures\r
     VirtioMmioSetGuestFeatures,            // SetGuestFeatures\r
     0,                                     // SubSystemDeviceId\r
     VirtioMmioGetDeviceFeatures,           // GetDeviceFeatures\r
     VirtioMmioSetGuestFeatures,            // SetGuestFeatures\r
-    VirtioMmioGetQueueAddress,             // GetQueueAddress\r
     VirtioMmioSetQueueAddress,             // SetQueueAddress\r
     VirtioMmioSetQueueSel,                 // SetQueueSel\r
     VirtioMmioSetQueueNotify,              // SetQueueNotify\r
     VirtioMmioSetQueueAddress,             // SetQueueAddress\r
     VirtioMmioSetQueueSel,                 // SetQueueSel\r
     VirtioMmioSetQueueNotify,              // SetQueueNotify\r
index d445c3dc197d86d50796860203571a85d5d8a6cd..3b1e90ba9f3b391d0dab4cd8b45157d9b6077e3e 100644 (file)
@@ -68,13 +68,6 @@ VirtioMmioGetDeviceFeatures (
   OUT UINT64                *DeviceFeatures\r
   );\r
 \r
   OUT UINT64                *DeviceFeatures\r
   );\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-VirtioMmioGetQueueAddress (\r
-  IN  VIRTIO_DEVICE_PROTOCOL *This,\r
-  OUT UINT32                 *QueueAddress\r
-  );\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioMmioGetQueueSize (\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioMmioGetQueueSize (\r
index 4b7d2932836295ebba9c969f2b342420350e413d..2cd293ab88d9459bdf31cc0f980cdd5c497e5418 100644 (file)
@@ -38,26 +38,6 @@ VirtioMmioGetDeviceFeatures (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-VirtioMmioGetQueueAddress (\r
-  IN  VIRTIO_DEVICE_PROTOCOL *This,\r
-  OUT UINT32                 *QueueAddress\r
-  )\r
-{\r
-  VIRTIO_MMIO_DEVICE *Device;\r
-\r
-  if (QueueAddress == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Device = VIRTIO_MMIO_DEVICE_FROM_VIRTIO_DEVICE (This);\r
-\r
-  *QueueAddress = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_QUEUE_PFN);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioMmioGetQueueSize (\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioMmioGetQueueSize (\r
index 2647bd39189bad481cce92cb9782e287cb84c2b1..25b06fcfd5ae263cc6ea6778eb4afa41d0ce49cc 100644 (file)
@@ -30,7 +30,6 @@ STATIC VIRTIO_DEVICE_PROTOCOL mDeviceProtocolTemplate = {
   0,                                    // SubSystemDeviceId\r
   VirtioPciGetDeviceFeatures,           // GetDeviceFeatures\r
   VirtioPciSetGuestFeatures,            // SetGuestFeatures\r
   0,                                    // SubSystemDeviceId\r
   VirtioPciGetDeviceFeatures,           // GetDeviceFeatures\r
   VirtioPciSetGuestFeatures,            // SetGuestFeatures\r
-  VirtioPciGetQueueAddress,             // GetQueueAddress\r
   VirtioPciSetQueueAddress,             // SetQueueAddress\r
   VirtioPciSetQueueSel,                 // SetQueueSel\r
   VirtioPciSetQueueNotify,              // SetQueueNotify\r
   VirtioPciSetQueueAddress,             // SetQueueAddress\r
   VirtioPciSetQueueSel,                 // SetQueueSel\r
   VirtioPciSetQueueNotify,              // SetQueueNotify\r
index 812061dc0c25b6dd65ec38cb097548e35963b6af..95f82611e29505fbc3ecd1eb4c918dd6dad07ad7 100644 (file)
@@ -86,13 +86,6 @@ VirtioPciGetDeviceFeatures (
   OUT UINT64                *DeviceFeatures\r
   );\r
 \r
   OUT UINT64                *DeviceFeatures\r
   );\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-VirtioPciGetQueueAddress (\r
-  IN  VIRTIO_DEVICE_PROTOCOL *This,\r
-  OUT UINT32                 *QueueAddress\r
-  );\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioPciGetQueueSize (\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioPciGetQueueSize (\r
index d8d30f9af63d6d7638928020c0e02bae462d320a..4ba37a2d1ceb79229577f28973d2d1bf46343f35 100644 (file)
@@ -122,25 +122,6 @@ VirtioPciGetDeviceFeatures (
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-VirtioPciGetQueueAddress (\r
-  IN  VIRTIO_DEVICE_PROTOCOL *This,\r
-  OUT UINT32                 *QueueAddress\r
-  )\r
-{\r
-  VIRTIO_PCI_DEVICE         *Dev;\r
-\r
-  if (QueueAddress == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);\r
-\r
-  return VirtioPciIoRead (Dev, VIRTIO_PCI_OFFSET_QUEUE_ADDRESS, sizeof (UINT32),\r
-      sizeof (UINT32), QueueAddress);\r
-}\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioPciGetQueueSize (\r
 EFI_STATUS\r
 EFIAPI\r
 VirtioPciGetQueueSize (\r