ARM: GICv3: copy Dom0 GICv3 reg property from host DT
authorAndre Przywara <andre.przywara@arm.com>
Tue, 30 Jan 2018 09:35:05 +0000 (09:35 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 30 Jan 2018 19:05:25 +0000 (11:05 -0800)
commit16a31ca735165e63d67e86f60996f2b6a31cc0ee
treefb923b3abd58bf9aa42b1167a6ed65fee9190e48
parent6fd572826c26f777b72e3b5f64a137dbcfdd6361
ARM: GICv3: copy Dom0 GICv3 reg property from host DT

At the moment we re-generate the Dom0 GICv3 DT node, by creating the
"reg" property from scratch using our previously parsed and
translated(!) host addresses. However we then write the *absolute*
addresses into the new node, not considering possible "range" mappings
in any of the GIC's parent nodes. So whenever one of the parents has a
non-empty ranges property, Dom0 will wrongly translate the addresses.
Properly incorporating the ranges properties sounds tedious, so let's
just copy the first part of the reg property instead (as we do for GICv2),
since the addresses for Dom0 are identical to those from the hardware.

The mainline kernel DT for the Espressobin board with an Marvell 3720 SoC
has the GIC in such an translated bus, so this patch allows this board
to boot properly (after adding support for the SoC's UART).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/gic-v3.c