函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:arch\x86\kernel\apic\io_apic.c Create Date:2022-07-27 09:29:36
首页 Copyright©Brick

1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
#undef native_restore_boot_irq_mode
void native_restore_boot_irq_mode(void)
{
    /*
     * If the i8259 is routed through an IOAPIC
     * Put that IOAPIC in virtual wire mode
     * so legacy interrupts can be delivered.
     */
    if (ioapic_i8259.pin != -1) {
        struct IO_APIC_route_entry entry;
 
        memset(&entry, 0, sizeof(entry));
        entry.mask      = IOAPIC_UNMASKED;
        entry.trigger       = IOAPIC_EDGE;
        entry.polarity      = IOAPIC_POL_HIGH;
        entry.dest_mode     = IOAPIC_DEST_MODE_PHYSICAL;
        entry.delivery_mode = dest_ExtINT;
        entry.dest      = read_apic_id();
 
        /*
         * Add it to the IO-APIC irq-routing table:
         */
        ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry);
    }
 
    if (boot_cpu_has(X86_FEATURE_APIC) || apic_from_smp_config())
        disconnect_bsp_APIC(ioapic_i8259.pin != -1);
}