audk/ArmPkg
Ard Biesheuvel df8c2668d7 ArmPkg/ArmDmaLib: clean up abuse of device address
In preparation of adding support to ArmDmalib for DMA bus masters whose
view of memory is offset by a constant compared to the CPU's view, clean
up some abuse of the device address.

The device address is not defined in terms of the CPU's address space,
and so it should not be used in CopyMem () or cache maintenance operations
that require a valid mapping. This not only applies to the above use case,
but also to the DebugUncachedMemoryAllocationLib that unmaps the
primary, cached mapping of an allocation, and returns a host address
which is an uncached alias offset by a constant.

Since we should never access the device address from the CPU, there is
no need to record it in the MAPINFO struct. Instead, record the buffer
address in case of double buffering, since we do need to copy the contents
(in case of a bus master write) and free the buffer (in all cases) when
DmaUnmap() is called.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-11-30 16:43:08 +00:00
..
Drivers ArmPkg/CpuDxe: set DmaBufferAlignment according to CWG 2016-11-02 16:22:48 +00:00
Filesystem/SemihostFs ArmPkg/SemihostFs: eliminate calls to deprecated string functions 2016-10-28 12:04:04 +01:00
Include ArmPkg: remove LoadConstantXxx() asm macros 2016-10-28 16:26:15 +01:00
Library ArmPkg/ArmDmaLib: clean up abuse of device address 2016-11-30 16:43:08 +00:00
ArmPkg.dec ArmPkg ArmPlatformPkg ArmVirtPkg: ARM GICv2/v3 Base Address width fix-up 2016-09-08 09:16:01 +01:00
ArmPkg.dsc ArmPkg: remove the LinuxLoader application 2016-11-25 12:56:15 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00