xen/arm: GICv3: Parse ITS information from the firmware tables later on
authorJulien Grall <julien.grall@linaro.org>
Wed, 24 Jan 2018 18:26:15 +0000 (18:26 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 30 Jan 2018 17:56:06 +0000 (09:56 -0800)
commita20013e8d90eed74f75a30603633b9a236bfa62f
tree2a2199d771d9cdcb31a580f36b761927c73fb13d
parent2b8d75e975d6fbe0140969154a67601698b84738
xen/arm: GICv3: Parse ITS information from the firmware tables later on

There are Device Tree (e.g for the Foundation Model) out that describes the
ITS but LPIs is not supported by the platform. Booting with such DT will
result to an early Data Abort. The same DT is booting fine with a
baremetal  Linux because ITS will be initialized only when LPIs is
supported.

While this is a bug in the DT, I think Xen should be boot with the same
hardware level support (e.g ITS will not be used) as with a baremetal
Linux.

The slight problem is Xen is relying on gicv3_its_host_has_its() to know
if ITS can be used. The list is populated by gicv3_its_{dt,acpi}_init().
It would be theoretically possible to gate those with a check of
GICD_TYPER.LPIS because we don't know yet whether the HW is an actual
GICv3/GICv4.

Looking at the callers of gicv3_its_host_has_its(), they will only be
done after gicv3_its_init() is called. Therefore move the parsing of ITS
information from firmware tables later on.

Note that gicv3_its_init() has been moved at the end of the file to
avoid forward declaration.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/gic-v3-its.c
xen/arch/arm/gic-v3.c
xen/include/asm-arm/gic_v3_its.h