diff options
Diffstat (limited to 'OvmfPkg/Library/VirtioMmioDeviceLib')
-rw-r--r-- | OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h | 4 | ||||
-rw-r--r-- | OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h index 3b1e90ba9f..4130dbc043 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h @@ -112,8 +112,8 @@ VirtioMmioSetQueueSel ( EFI_STATUS
VirtioMmioSetQueueAddress (
- VIRTIO_DEVICE_PROTOCOL *This,
- UINT32 Address
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN VRING *Ring
);
EFI_STATUS
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c index 2cd293ab88..53c734f6b1 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c @@ -180,15 +180,16 @@ VirtioMmioSetQueueSel ( EFI_STATUS
VirtioMmioSetQueueAddress (
- VIRTIO_DEVICE_PROTOCOL *This,
- UINT32 Address
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN VRING *Ring
)
{
VIRTIO_MMIO_DEVICE *Device;
Device = VIRTIO_MMIO_DEVICE_FROM_VIRTIO_DEVICE (This);
- VIRTIO_CFG_WRITE (Device, VIRTIO_MMIO_OFFSET_QUEUE_PFN, Address);
+ VIRTIO_CFG_WRITE (Device, VIRTIO_MMIO_OFFSET_QUEUE_PFN,
+ (UINT32)((UINTN)Ring->Base >> EFI_PAGE_SHIFT));
return EFI_SUCCESS;
}
|