summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Ecc/CodeFragment.py
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2017-08-31 17:25:27 +0300
committerLaszlo Ersek <lersek@redhat.com>2017-08-31 22:28:26 +0300
commit9d0d5050c73b142ea03c82cd078be8c703a556f4 (patch)
tree2624a34084334054413de5a5462f712160bf7b54 /BaseTools/Source/Python/Ecc/CodeFragment.py
parent1b15eb06c7f2687ee92cf90f1581c7044691d71f (diff)
downloadedk2-9d0d5050c73b142ea03c82cd078be8c703a556f4.tar.xz
OvmfPkg/VirtioScsiDxe: map virtio-scsi request and response buffers
When device is behind the IOMMU, driver is require to pass the device address of virtio request, response and any memory referenced by those request/response to the bus master. The patch uses IOMMU-like member functions from VIRTIO_DEVICE_PROTOCOL to map request and response buffers system physical address to the device address. - If the buffer need to be accessed by both the processor and a bus master then map with BusMasterCommonBuffer. - If the buffer need to be accessed for a write operation by a bus master then map with BusMasterWrite. However, after a BusMasterWrite Unmap() failure, error reporting via EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET would be very complex, therefore we map such buffers too with BusMasterCommonBuffer. - If the buffer need to be accessed for a read operation by a bus master then map with BusMasterRead. 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> [lersek@redhat.com: restore lost sentence/paragraph in commit message] [lersek@redhat.com: reindent/reflow "InDataBuffer" comment block] [lersek@redhat.com: cast arg, not result, of EFI_SIZE_TO_PAGES() to UINTN] 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 'BaseTools/Source/Python/Ecc/CodeFragment.py')
0 files changed, 0 insertions, 0 deletions