ArmPkg/CpuDxe: set DmaBufferAlignment according to CWG
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 31 Oct 2016 15:43:49 +0000 (15:43 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 2 Nov 2016 16:22:48 +0000 (16:22 +0000)
commit756a514aa469c35e1a21c034a513630b7f02ecff
tree724b4ec60a9db9a6d7301963c7719e5377e1cb50
parenta8f37449c7e355e6402e3876c9db9e11d875164f
ArmPkg/CpuDxe: set DmaBufferAlignment according to CWG

The DmaBufferAlignment currently defaults to 4, which is dangerously
small and may result in lost data on platforms that perform non-coherent
DMA. So instead, take the CWG value from the cache info registers.

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/Drivers/CpuDxe/CpuDxe.c