@@ -123,35 +123,14 @@ typedef
EFI_STATUS
(EFIAPI *VIRTIO_SET_GUEST_FEATURES) (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT64 Features
);
/**
- 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
by 4096.
@param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
@@ -352,15 +331,14 @@ struct _VIRTIO_DEVICE_PROTOCOL {
UINT32 Revision;
/// From the Virtio Spec
INT32 SubSystemDeviceId;
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;
VIRTIO_SET_QUEUE_NOTIFY SetQueueNotify;
VIRTIO_SET_QUEUE_ALIGN SetQueueAlign;
@@ -66,21 +66,14 @@ EFIAPI
VirtioMmioGetDeviceFeatures (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT64 *DeviceFeatures
);
EFI_STATUS
EFIAPI
-VirtioMmioGetQueueAddress (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- );
-
-EFI_STATUS
-EFIAPI
VirtioMmioGetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT16 *QueueNumMax
);
EFI_STATUS
EFIAPI
@@ -84,21 +84,14 @@ EFIAPI
VirtioPciGetDeviceFeatures (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT64 *DeviceFeatures
);
EFI_STATUS
EFIAPI
-VirtioPciGetQueueAddress (
- IN VIRTIO_DEVICE_PROTOCOL *This,
- OUT UINT32 *QueueAddress
- );
-
-EFI_STATUS
-EFIAPI
VirtioPciGetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT16 *QueueNumMax
);
EFI_STATUS
EFIAPI
@@ -21,15 +21,14 @@
#include "VirtioMmioDevice.h"
static VIRTIO_DEVICE_PROTOCOL mMmioDeviceProtocolTemplate = {
0, // Revision
0, // SubSystemDeviceId
VirtioMmioGetDeviceFeatures, // GetDeviceFeatures
VirtioMmioSetGuestFeatures, // SetGuestFeatures
- VirtioMmioGetQueueAddress, // GetQueueAddress
VirtioMmioSetQueueAddress, // SetQueueAddress
VirtioMmioSetQueueSel, // SetQueueSel
VirtioMmioSetQueueNotify, // SetQueueNotify
VirtioMmioSetQueueAlignment, // SetQueueAlign
VirtioMmioSetPageSize, // SetPageSize
VirtioMmioGetQueueSize, // GetQueueNumMax
VirtioMmioSetQueueSize, // SetQueueNum
@@ -36,34 +36,14 @@ VirtioMmioGetDeviceFeatures (
*DeviceFeatures = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_HOST_FEATURES);
return EFI_SUCCESS;
}
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
)
{
VIRTIO_MMIO_DEVICE *Device;
@@ -26,15 +26,14 @@
#include "VirtioPciDevice.h"
STATIC VIRTIO_DEVICE_PROTOCOL mDeviceProtocolTemplate = {
0, // Revision
0, // SubSystemDeviceId
VirtioPciGetDeviceFeatures, // GetDeviceFeatures
VirtioPciSetGuestFeatures, // SetGuestFeatures
- VirtioPciGetQueueAddress, // GetQueueAddress
VirtioPciSetQueueAddress, // SetQueueAddress
VirtioPciSetQueueSel, // SetQueueSel
VirtioPciSetQueueNotify, // SetQueueNotify
VirtioPciSetQueueAlignment, // SetQueueAlignment
VirtioPciSetPageSize, // SetPageSize
VirtioPciGetQueueSize, // GetQueueNumMax
VirtioPciSetQueueSize, // SetQueueNum
@@ -120,33 +120,14 @@ VirtioPciGetDeviceFeatures (
*DeviceFeatures = Features32;
}
return Status;
}
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
)
{
VIRTIO_PCI_DEVICE *Dev;