EmbeddedPkg/NonCoherentDmaLib: implement support for DMA range limits

Implement support for driving peripherals with limited DMA ranges to
NonCoherentDmaLib, by adding a device address limit, and taking it,
along with the device offset, into account when allocating or mapping
DMA buffers.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Pete Batard <pete@akeo.ie>
Acked-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Ard Biesheuvel
2019-11-21 09:32:26 +01:00
committed by mergify[bot]
parent 9caaa79dd7
commit 62a75650e4
3 changed files with 160 additions and 12 deletions

View File

@@ -186,6 +186,12 @@
#
gEmbeddedTokenSpaceGuid.PcdDmaDeviceOffset|0x0|UINT64|0x0000058
#
# Highest address value supported by the device for DMA addressing. Note
# that this value should be strictly greater than PcdDmaDeviceOffset.
#
gEmbeddedTokenSpaceGuid.PcdDmaDeviceLimit|0xFFFFFFFFFFFFFFFF|UINT64|0x000005A
#
# Selection between DT and ACPI as a default
#