diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2017-08-23 06:57:15 -0400 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-08-25 10:42:18 +0200 |
commit | 4157b8416a15ff25e0fee131a2391bb95ae21904 (patch) | |
tree | 1e37b5a9212920678262a9641e0cb72e1e72e78e /OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | |
parent | de1c57c5f5a7999b9430f688640c8955d2a5f5ec (diff) | |
download | edk2-4157b8416a15ff25e0fee131a2391bb95ae21904.tar.gz edk2-4157b8416a15ff25e0fee131a2391bb95ae21904.tar.bz2 edk2-4157b8416a15ff25e0fee131a2391bb95ae21904.zip |
OvmfPkg/VirtioPciDeviceDxe: implement IOMMU-like member functions
The patch implements the newly added IOMMU-like member functions by
respectively delegating the job to:
- VIRTIO_DEVICE_PROTOCOL.AllocateSharedPages () ->
MemoryAllocationLib.AllocatePages()
- VIRTIO_DEVICE_PROTOCOL.FreeSharedPages () ->
MemoryAllocationLib.FreePages ()
- VIRTIO_DEVICE_PROTOCOL.MapSharedBuffer () -> no-op
- VIRTIO_DEVICE_PROTOCOL.UnmapSharedBuffer () -> no-op
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c')
-rw-r--r-- | OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c index 8aae58e8b4..d4b4ec21c3 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c @@ -5,6 +5,7 @@ Copyright (C) 2012, Red Hat, Inc.
Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (C) 2013, ARM Ltd.
+ Copyright (C) 2017, AMD Inc, All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -40,7 +41,11 @@ STATIC VIRTIO_DEVICE_PROTOCOL mDeviceProtocolTemplate = { VirtioPciGetDeviceStatus, // GetDeviceStatus
VirtioPciSetDeviceStatus, // SetDeviceStatus
VirtioPciDeviceWrite, // WriteDevice
- VirtioPciDeviceRead // ReadDevice
+ VirtioPciDeviceRead, // ReadDevice
+ VirtioPciAllocateSharedPages, // AllocateSharedPages
+ VirtioPciFreeSharedPages, // FreeSharedPages
+ VirtioPciMapSharedBuffer, // MapSharedBuffer
+ VirtioPciUnmapSharedBuffer, // UnmapSharedBuffer
};
/**
|