summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/BuildVersion.py
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-01-27 07:29:12 +0100
committerLaszlo Ersek <lersek@redhat.com>2017-01-31 00:14:39 +0100
commite8ae381f608ae02662f4dcc7379898162645d2ca (patch)
treed1221e27c63e9aef8dafaecae1e76dd92d3bb59a /BaseTools/Source/Python/Common/BuildVersion.py
parent4175356fb4bfe89415677aed8fb4e6928ced2ff1 (diff)
downloadedk2-e8ae381f608ae02662f4dcc7379898162645d2ca.tar.gz
edk2-e8ae381f608ae02662f4dcc7379898162645d2ca.tar.bz2
edk2-e8ae381f608ae02662f4dcc7379898162645d2ca.zip
ArmVirtPkg/QemuFwCfgLib: use DMA for QemuFwCfgWriteBytes() if available
We use the "InternalQemuFwCfgReadBytes" static function pointer to dispatch the reading of fw_cfg bytes between MMIO and DMA. This pointer is initialized to MMIO, and we set it to DMA in the library constructor if DMA is available. Unlike the above, we write fw_cfg bytes only with MMIO at the moment. Extend the write functionality so that it follows the read pattern: - introduce the new function typedef WRITE_BYTES_FUNCTION, - extract the current (MMIO-only) write internals from QemuFwCfgWriteBytes() to MmioWriteBytes(), - provide a DMA-based implementation in DmaWriteBytes() -- a thin wrapper around DmaTransferBytes(), - set the new static function pointer "InternalQemuFwCfgWriteBytes" according to the DMA feature provided by QEMU, - In QemuFwCfgWriteBytes(), call the best available method through "InternalQemuFwCfgWriteBytes". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=359 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/BuildVersion.py')
0 files changed, 0 insertions, 0 deletions