ARM: new VGIC: Add MMIO handling framework
authorAndre Przywara <andre.przywara@linaro.org>
Wed, 7 Feb 2018 13:28:55 +0000 (13:28 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Mar 2018 18:03:37 +0000 (11:03 -0700)
commit291172a7311aaa39a8162e25f32b385afa86a5c3
treea724f623efadf42def2138e2046b57d858620a0d
parent42e969997142641cd007b9b2796533b6c82a3a72
ARM: new VGIC: Add MMIO handling framework

Add an MMIO handling framework to the VGIC emulation:
Each register is described by its offset, size (or number of bits per
IRQ, if applicable) and the read/write handler functions. We provide
initialization macros to describe each GIC register later easily.

Separate dispatch functions for read and write accesses are connected
to Xen's MMIO handling framework and binary-search for the responsible
register handler based on the offset address within the region.

The register handler prototype are courtesy of Christoffer Dall.

This is based on Linux commit 4493b1c4866a, written by Marc Zyngier.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/vgic/vgic-mmio.c [new file with mode: 0644]
xen/arch/arm/vgic/vgic-mmio.h [new file with mode: 0644]