VirtualBox

Changeset 34695 in vbox for trunk/src


Ignore:
Timestamp:
Dec 3, 2010 1:38:26 PM (14 years ago)
Author:
vboxsync
Message:

PIC: Reversed IRQ flip-flop polarity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPIC.cpp

    r28800 r34695  
    359359    DumpPICState(&pThis->aPics[1], "picSetIrq");
    360360    STAM_COUNTER_INC(&pThis->CTXSUFF(StatSetIrq));
     361    if ((iLevel & PDM_IRQ_LEVEL_FLIP_FLOP) == PDM_IRQ_LEVEL_FLIP_FLOP)
     362    {
     363        /* A flip-flop lowers the IRQ line and immediately raises it, so
     364         * that a rising edge is guaranteed to occur. Note that the IRQ
     365         * line must be held high for a while to avoid spurious interrupts.
     366         */
     367        pic_set_irq1(&pThis->aPics[iIrq >> 3], iIrq & 7, 0);
     368        pic_update_irq(pThis);
     369    }
    361370    pic_set_irq1(&pThis->aPics[iIrq >> 3], iIrq & 7, iLevel & PDM_IRQ_LEVEL_HIGH);
    362371    pic_update_irq(pThis);
    363     if ((iLevel & PDM_IRQ_LEVEL_FLIP_FLOP) == PDM_IRQ_LEVEL_FLIP_FLOP)
    364     {
    365         pic_set_irq1(&pThis->aPics[iIrq >> 3], iIrq & 7, 0);
    366         pic_update_irq(pThis);
    367     }
    368372}
    369373
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette