xen/arm: Take into account the DMA width when allocating Dom0 memory banks
authorJulien Grall <jgrall@amazon.com>
Sat, 16 May 2020 10:57:00 +0000 (11:57 +0100)
committerJulien Grall <jgrall@amazon.com>
Sun, 24 May 2020 14:00:40 +0000 (15:00 +0100)
commitca3c17c4fc0bc737865ebb2f3eaa4874889290ad
tree4b4d631e967b1334b39e858a8fc0c25b5432b3d4
parentb92223aeedc5cf1cd2882a7b769865d652cf8b06
xen/arm: Take into account the DMA width when allocating Dom0 memory banks

At the moment, Xen is assuming that all the devices are at least 32-bit
DMA capable. However, some SoCs have devices that may be able to access
a much restricted range. For instance, the Raspberry PI 4 has devices
that can only access the first GB of RAM.

The function arch_get_dma_bit_size() will return the lowest DMA width on
the platform. Use it to decide what is the limit for the low memory.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Tested-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c