Author: jhb
Date: Fri Oct 14 21:51:50 2016
New Revision: 307333

  Reprogram I/O APIC interrupt pins when registering an I/O APIC.
  All I/O APIC pins are masked when an I/O APIC is first probed.  The
  APIC enumerator (MP Table or MADT) then parses its associated tables to
  configure individual pins to set custom delivery modes or alternate
  routing (e.g. routing IRQ 0 to intpin 2).  Pins for regular interrupt
  pins are left masked until the first interrupt is assigned.  However,
  pins with unusual settings (e.g. NMI or SMI) are never assigned an
  interrupt and thus never re-programmed.  The I/O APIC code used to
  reprogram all interrupt pins during registration but this was lost in
  In theory, this is mostly a no-op as the ACPI APIC table does not
  include a way to enumerate NMI or SMI pins for the I/O APIC, so only
  systems using an MP Table would be affected.
  Reported by:  avg
  MFC after:    1 month


Modified: head/sys/x86/x86/io_apic.c
--- head/sys/x86/x86/io_apic.c  Fri Oct 14 20:01:07 2016        (r307332)
+++ head/sys/x86/x86/io_apic.c  Fri Oct 14 21:51:50 2016        (r307333)
@@ -916,11 +916,16 @@ ioapic_register(void *cookie)
            io->io_id, flags >> 4, flags & 0xf, io->io_intbase,
            io->io_intbase + io->io_numintr - 1);
-       /* Register valid pins as interrupt sources. */
+       /*
+        * Reprogram pins to handle special case pins (such as NMI and
+        * SMI) and register valid pins as interrupt sources.
+        */
-       for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++)
+       for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++) {
+               ioapic_reprogram_intpin(&pin->io_intsrc);
                if (pin->io_irq < NUM_IO_INTS)
+       }
 /* A simple new-bus driver to consume PCI I/O APIC devices. */
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to