summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Ecc
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-08-17 13:16:58 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-08-17 15:32:30 +0100
commit3a424c5f49239b810e08aa23368945a9f0360d4c (patch)
treead6e1aaf866a0a4d68bc6303fb5a7a466573b997 /BaseTools/Source/Python/Ecc
parent5f0f5e90ae8c57f4a0702740d5aee95ce50fc684 (diff)
downloadedk2-3a424c5f49239b810e08aa23368945a9f0360d4c.tar.gz
edk2-3a424c5f49239b810e08aa23368945a9f0360d4c.tar.bz2
edk2-3a424c5f49239b810e08aa23368945a9f0360d4c.zip
ArmPkg/ArmDmaLib: use double buffering only for bus master write
The ArmPkg implementation of DmaLib uses double buffering to ensure that any attempt to perform non-coherent DMA on unaligned buffers cannot corrupt adjacent unrelated data which happens to share cachelines with the data we are exchanging with the device. Such corruption can only occur on bus master write, in which case we have to invalidate the caches to ensure the CPU will see the data written to memory by the device. In the bus master read case, we can simply clean and invalidate at the same time, which may purge unrelated adjacent data from the caches, but will not corrupt its contents. Also, this double buffer does not necessarily have to be allocated from uncached memory: by the same reasoning, we can perform cache invalidation on an ordinary pool allocation as long as we take the same alignment constraints into account. So update our code accordingly: remove double buffering from the bus master read path, and switch to a pool allocation for the double buffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'BaseTools/Source/Python/Ecc')
0 files changed, 0 insertions, 0 deletions