Rather than exploding very early on, just skip the GICv3 initialization
if no GICv3 CPU interface is reported available.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[Mark: amend comment]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
.global gic_secure_init
gic_secure_init:
+ /*
+ * If GICv3 is not available, skip initialisation. The OS will probably
+ * fail with a warning, but this should be easier to debug than a
+ * failure within the boot wrapper.
+ */
+ mrs x0, id_aa64pfr0_el1
+ ubfx x0, x0, #24, #4
+ cmp x0, #1
+ b.ne skip_gicv3
+
/*
* Only the primary CPU setups the (re)distributors.
*/
msr ICC_CTLR_EL3, xzr
isb
+skip_gicv3:
ret