]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/ArmDmaLib: do not remap arbitrary memory regions as uncached
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 19 Apr 2016 14:37:04 +0000 (16:37 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 10 May 2016 12:44:40 +0000 (14:44 +0200)
commit32e5fb76e5692911d5176ac4dc9cedafbe7fa5c9
treea28488ba4edb0a63d4a5eeddd602b4ea359a05a5
parenta24f7d6680dd71616b0fcb9c5a65263fce1722be
ArmPkg/ArmDmaLib: do not remap arbitrary memory regions as uncached

In the DmaMap () operation, if the region to be mapped happens to be
aligned to the Cache Writeback Granule (CWG) (whose value is typically
64 or 128 bytes and 2 KB maximum), we remap the memory as uncached.

Since remapping memory occurs at page granularity, while the buffer and the
CWG may be much smaller, there is no telling what other memory we affect
by doing this, especially since the operation is not reverted in DmaUnmap().

So remove the remapping call.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/ArmDmaLib/ArmDmaLib.c