• Soby Mathew's avatar
    GIC: Ensure SGIs and PPIs are Group0 before setup · 47c6876a
    Soby Mathew authored
    The legacy GIC driver assumes that the SGIs and PPIs are Group0 during
    initialization. This is true if the driver is the first one to initialize
    the GIC hardware after reset. But in some cases, earlier BL stages could
    have already initialized the GIC hardware which means that SGI and PPI
    configuration are not the expected reset values causing assertion failure
    in `gicd_set_ipriorityr()`. This patch explicitly resets the SGI and PPI
    to Group0 prior to their initialization in the driver. The same patch is
    not done in the GICv2-only driver because unlike in the legacy driver,
    `gicd_set_ipriorityr()` of GICv2 driver doesn't enforce this policy and
    the appropriate group is set irrespective of the initial value.
    
    Fixes ARM-software/tf-issues#396
    
    Change-Id: I521d35caa37470ce542c796c2ba99716e4763105
    47c6876a
arm_gic.c 15.1 KB