Skip to content
Commit d50314a6 authored by Catalin Marinas's avatar Catalin Marinas
Browse files

arm64: Create non-empty ZONE_DMA when DRAM starts above 4GB



ZONE_DMA is created to allow 32-bit only devices to access memory in the
absence of an IOMMU. On systems where the memory starts above 4GB, it is
expected that some devices have a DMA offset hardwired to be able to
access the bottom of the memory. Linux currently supports DT bindings
for the DMA offsets but they are not (easily) available early during
boot.

This patch tries to guess a DMA offset and assumes that ZONE_DMA
corresponds to the 32-bit mask above the start of DRAM.

Fixes: 2d5a5612 (arm64: Limit the CMA buffer to 32-bit if ZONE_DMA)
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reported-by: default avatarMark Salter <msalter@redhat.com>
Tested-by: default avatarMark Salter <msalter@redhat.com>
Tested-by: default avatarAnup Patel <anup.patel@linaro.org>
parent fa2ec3ea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment