xen/arm: gic: Check the size of the CPU and vCPU interface retrieved from DT
authorJulien Grall <julien.grall@citrix.com>
Thu, 8 Oct 2015 18:23:52 +0000 (19:23 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 23 Oct 2015 13:27:06 +0000 (14:27 +0100)
commit61edf8a6f837b45572704aceca7c71d67858c062
tree67f493ea6caa28761beb17327791fecf5ab99b22
parent8ee6d574b7073b5c98fcf94d20a53197609b85e1
xen/arm: gic: Check the size of the CPU and vCPU interface retrieved from DT

The size of the CPU interface will be used in a follow-up patch to map the
region in Xen memory.

Based on GICv2 spec, the CPU interface should at least be 8KB, although
most of the platform we are supporting use incorrectly the GICv1 size
(i.e 4KB) in their DT. Only warn and update the size to avoid any
breakage on these platforms.

Furthermore, Xen is relying on the fact that the Virtual CPU interface
is at least 8KB. As in reality the Virtual CPU interface matches the CPU
interface, check that the 2 interfaces have the same size.

For GICv3, vGICv2 is only available for guest. So we only need to check
that the GICV is at least 8KB.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- typos ]
xen/arch/arm/gic-v2.c
xen/arch/arm/gic-v3.c