ICU/APIC cleanup part 10/many. Be a lot more careful programming the IO APIC.
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 4 Nov 2005 01:21:39 +0000 (01:21 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 4 Nov 2005 01:21:39 +0000 (01:21 +0000)
commit65de6d19559d3c72df543a2afc76c89222b9c6b5
tree8b9370bdff9df52f29db6e3d5d6cb59c7eaa161b
parent35408d22434da40f593386eabaf0b12b159b1402
ICU/APIC cleanup part 10/many.  Be a lot more careful programming the IO APIC.

* During initial pin programming, unprogrammed pins are placed in as
  disconnected a state as possible by not only masking them, but
  completely resetting their configuration.

* When programming or reprogramming an IO APIC pin, always place it into
  edge-triggered mode before placing it into the actual mode.  This will
  hopefully ensure that the IRR bit gets cleared just in case an interrupt
  had been queued to an LAPIC and not yet EOI'd.  Otherwise, just
  changing the vector can cause the EOI to get lost (my best understanding
  of the IO APIC is that EOIs are based on the vector number).

* Use imen_lock/unlock around all IO APIC reprogramming sections.
sys/i386/apic/apic_abi.c
sys/i386/apic/mpapic.c
sys/platform/pc32/apic/apic_abi.c
sys/platform/pc32/apic/mpapic.c