Print this page
4443 apic_intrmap_init comment could use an update

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
          +++ new/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
↓ open down ↓ 1491 lines elided ↑ open up ↑
1492 1492          }
1493 1493          lock_clear(&apic_mode_switch_lock);
1494 1494          intr_restore(iflag);
1495 1495  }
1496 1496  
1497 1497  void
1498 1498  apic_intrmap_init(int apic_mode)
1499 1499  {
1500 1500          int suppress_brdcst_eoi = 0;
1501 1501  
     1502 +        /*
     1503 +         * Intel Software Developer's Manual 3A, 10.12.7:
     1504 +         *
     1505 +         * Routing of device interrupts to local APIC units operating in
     1506 +         * x2APIC mode requires use of the interrupt-remapping architecture
     1507 +         * specified in the Intel Virtualization Technology for Directed
     1508 +         * I/O, Revision 1.3.  Because of this, BIOS must enumerate support
     1509 +         * for and software must enable this interrupt remapping with
     1510 +         * Extended Interrupt Mode Enabled before it enabling x2APIC mode in
     1511 +         * the local APIC units.
     1512 +         *
     1513 +         *
     1514 +         * In other words, to use the APIC in x2APIC mode, we need interrupt
     1515 +         * remapping.  Since we don't start up the IOMMU by default, we
     1516 +         * won't be able to do any interrupt remapping and therefore have to
     1517 +         * use the APIC in traditional 'local APIC' mode with memory mapped
     1518 +         * I/O.
     1519 +         */
     1520 +
1502 1521          if (psm_vt_ops != NULL) {
1503      -                /*
1504      -                 * Since X2APIC requires the use of interrupt remapping
1505      -                 * (though this is not documented explicitly in the Intel
1506      -                 * documentation (yet)), initialize interrupt remapping
1507      -                 * support before initializing the X2APIC unit.
1508      -                 */
1509 1522                  if (((apic_intrmap_ops_t *)psm_vt_ops)->
1510 1523                      apic_intrmap_init(apic_mode) == DDI_SUCCESS) {
1511 1524  
1512 1525                          apic_vt_ops = psm_vt_ops;
1513 1526  
1514 1527                          /*
1515 1528                           * We leverage the interrupt remapping engine to
1516 1529                           * suppress broadcast EOI; thus we must send the
1517 1530                           * directed EOI with the directed-EOI handler.
1518 1531                           */
↓ open down ↓ 210 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX