]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/ArmDmaLib: use the cache writeback granularity for alignment
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 9 Nov 2015 13:28:33 +0000 (13:28 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Mon, 9 Nov 2015 13:28:33 +0000 (13:28 +0000)
commit07c707858d2547aff283f2e639559627f98d3a9c
tree81fb15aaad588769323f22b048c8c7e8a406a7a4
parentc653fc2a91a946ea249e5d6161bca84f6c824f09
ArmPkg/ArmDmaLib: use the cache writeback granularity for alignment

When allocating memory to perform non-coherent DMA, use the cache
writeback granule rather than the data cache linesize for alignment.
This prevents the explicit cache maintenance from corrupting
unrelated adjacent data if the cache writeback granule exceeds
the cache linesize.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18759 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Library/ArmDmaLib/ArmDmaLib.c