Пример #1
0
static void __init xgene_check_pirq_eoi(void)
{
    const struct dt_device_node *node;
    int res;
    paddr_t dbase;
    const struct dt_device_match xgene_dt_int_ctrl_match[] =
    {
        DT_MATCH_COMPATIBLE("arm,cortex-a15-gic"),
        { /*sentinel*/ },
    };

    node = dt_find_interrupt_controller(xgene_dt_int_ctrl_match);
    if ( !node )
        panic("%s: Can not find interrupt controller node", __func__);

    res = dt_device_get_address(node, 0, &dbase, NULL);
    if ( !dbase )
        panic("%s: Cannot find a valid address for the distributor", __func__);

    /*
     * In old X-Gene Storm firmware and DT, secure mode addresses have
     * been mentioned in GICv2 node. We have to use maintenance interrupt
     * instead of EOI HW in this case. We check the GIC Distributor Base
     * Address to maintain compatibility with older firmware.
     */
    if ( dbase == XGENE_SEC_GICV2_DIST_ADDR )
    {
        xgene_quirks |= PLATFORM_QUIRK_GUEST_PIRQ_NEED_EOI;
        printk("Xen: WARNING: OLD X-Gene Firmware, disabling PIRQ EOI mode\n");
    }
}
Пример #2
0
static void __init xgene_check_pirq_eoi(void)
{
    const struct dt_device_node *node;
    int res;
    paddr_t dbase;
    const struct dt_device_match xgene_dt_int_ctrl_match[] =
    {
        DT_MATCH_COMPATIBLE("arm,cortex-a15-gic"),
        { /*sentinel*/ },
    };

    node = dt_find_interrupt_controller(xgene_dt_int_ctrl_match);
    if ( !node )
        panic("%s: Can not find interrupt controller node", __func__);

    res = dt_device_get_address(node, 0, &dbase, NULL);
    if ( !dbase )
        panic("%s: Cannot find a valid address for the distributor", __func__);

    /*
     * In old X-Gene Storm firmware and DT, secure mode addresses have
     * been mentioned in GICv2 node. EOI HW won't work in this case.
     * We check the GIC Distributor Base Address to deny Xen booting
     * with older firmware.
     */
    if ( dbase == XGENE_SEC_GICV2_DIST_ADDR )
        panic("OLD X-Gene Firmware is not supported by Xen.\n"
              "Please upgrade your firmware to the latest version");
}