]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
boot-wrapper: arm64: gicv3: skip GIC init if not available
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 6 Aug 2014 14:45:10 +0000 (15:45 +0100)
committerMark Rutland <mark.rutland@arm.com>
Thu, 6 Nov 2014 17:34:24 +0000 (17:34 +0000)
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>
gic-v3.S

index 7bf3c54ce77577571b87a201a93533526dc2089b..8233aabba699f2ec7b915138d9b6c780f9ebad4e 100644 (file)
--- a/gic-v3.S
+++ b/gic-v3.S
        .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.
         */
@@ -86,4 +96,5 @@ setup_cpu_if:
        msr     ICC_CTLR_EL3, xzr
        isb
 
+skip_gicv3:
        ret