audk/ArmVirtPkg
Laszlo Ersek e8ae381f60 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>
2017-01-31 00:14:39 +01:00
..
FdtClientDxe ArmVirtPkg/FdtClientDxe: add methods to iterate over memory nodes 2016-09-15 15:39:29 +01:00
HighMemDxe ArmVirtPkg/HighMemDxe: move to FDT client protocol 2016-09-15 15:39:34 +01:00
Include ArmVirtPkg/FdtClientDxe: add methods to iterate over memory nodes 2016-09-15 15:39:29 +01:00
Library ArmVirtPkg/QemuFwCfgLib: use DMA for QemuFwCfgWriteBytes() if available 2017-01-31 00:14:39 +01:00
PrePi ArmVirtPkg/PrePi: remove mSystemMemoryEnd 2016-10-24 15:57:25 +01:00
VirtioFdtDxe ArmVirtPkg/VirtFdtDxe: remove Xenio handling and rename to VirtioFdtDxe 2016-04-13 17:26:07 +02:00
XenAcpiPlatformDxe ArmVirtPkg/FdtClientDxe: report address and size cell count directly 2016-09-15 15:31:24 +01:00
XenioFdtDxe ArmVirtPkg/FdtClientDxe: report address and size cell count directly 2016-09-15 15:31:24 +01:00
ArmVirt.dsc.inc ArmVirtPkg: disable deprecated interfaces 2016-10-25 10:46:44 +02:00
ArmVirtPkg.dec ArmVirtPkg: remove PcdKludgeMapPciMmioAsCached 2016-09-01 22:56:04 +02:00
ArmVirtQemu.dsc ArmVirtPkg/ArmVirtQemu: Install BGRT ACPI table 2017-01-16 17:06:10 +00:00
ArmVirtQemu.fdf ArmVirtPkg: factor out Rules FDF section 2016-07-12 15:19:42 +02:00
ArmVirtQemuFvMain.fdf.inc ArmVirtPkg/ArmVirtQemu: Install BGRT ACPI table 2017-01-16 17:06:10 +00:00
ArmVirtQemuKernel.dsc ArmVirtPkg/ArmVirtQemu: Install BGRT ACPI table 2017-01-16 17:06:10 +00:00
ArmVirtQemuKernel.fdf ArmVirtPkg: factor out Rules FDF section 2016-07-12 15:19:42 +02:00
ArmVirtRules.fdf.inc ArmVirtPkg: Add Ramdisk support to ArmVirtPkg platforms 2016-08-22 09:05:17 +02:00
ArmVirtXen.dsc ArmVirtPkg: replace all ArmLib resolutions with ArmBaseLib 2016-09-08 10:02:32 +01:00
ArmVirtXen.fdf ArmVirtPkg: enable EBC interpreter for AArch64 2016-08-26 11:53:48 +01:00
Contributions.txt ArmVirtPkg: add "Contributions.txt" and "License.txt" 2015-06-08 22:00:36 +00:00
License.txt ArmVirtPkg: add "Contributions.txt" and "License.txt" 2015-06-08 22:00:36 +00:00
VarStore.fdf.inc ArmVirtPkg: add FDF definition for empty varstore 2016-06-23 16:07:38 +02:00