diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2017-09-14 16:22:45 -0500 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-09-14 23:54:15 +0200 |
commit | bd114d9f776bfd26a1cf4c731429112821c9e944 (patch) | |
tree | a4775431a938806d8999fe2cffe3d2fac7caace3 /OvmfPkg/VirtioNetDxe/VirtioNet.inf | |
parent | 76ad23ca82292a8fa3e9f3f8d5637f7aecbb9d69 (diff) | |
download | edk2-bd114d9f776bfd26a1cf4c731429112821c9e944.tar.gz edk2-bd114d9f776bfd26a1cf4c731429112821c9e944.tar.bz2 edk2-bd114d9f776bfd26a1cf4c731429112821c9e944.zip |
OvmfPkg/VirtioNetDxe: add Tx packet map/unmap helper functions
When device is behind IOMMU, driver is require to pass the device address
of TxBuf in the Tx VRING. The patch adds helper functions and data
structure to map and unmap the TxBuf system physical address to a device
address.
Since the TxBuf is returned back to caller from VirtioNetGetStatus() hence
we use OrderedCollection interface to save the TxBuf system physical to
device address mapping. After the TxBuf is succesfully transmitted
VirtioNetUnmapTxBuf() does the reverse lookup in OrderedCollection data
structure to get the system physical address of TxBuf for a given device
address.
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>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/VirtioNetDxe/VirtioNet.inf')
-rw-r--r-- | OvmfPkg/VirtioNetDxe/VirtioNet.inf | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioNetDxe/VirtioNet.inf b/OvmfPkg/VirtioNetDxe/VirtioNet.inf index a855ad4ac1..9ff6d87e61 100644 --- a/OvmfPkg/VirtioNetDxe/VirtioNet.inf +++ b/OvmfPkg/VirtioNetDxe/VirtioNet.inf @@ -49,6 +49,7 @@ DebugLib
DevicePathLib
MemoryAllocationLib
+ OrderedCollectionLib
UefiBootServicesTableLib
UefiDriverEntryPoint
UefiLib
|