VirtualBox

Changeset 27254 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 10, 2010 3:03:11 PM (15 years ago)
Author:
vboxsync
Message:

HPET: correct interrupts delivery

File:
1 edited

Legend:

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

    r27229 r27254  
    355355     *   timer 0: IRQ0 for PIC and IRQ2 for APIC
    356356     *   timer 1: IRQ8 for both PIC and APIC
    357      * As primary usecase for HPET is APIC config, we pretend
    358      * being always APIC, although for safety we shall check currect IC.
    359      * @todo: implement private interface between HPET and PDM
    360      *        to allow figuring that out and enabling/disabling
    361      *        PIT and RTC
     357     *
     358     * ISA IRQ delivery logic will take care of correct delivery
     359     * to the different ICs.
    362360     */
    363361    if ((pTimer->u8TimerNumber <= 1) &&
    364362        (pTimer->CTX_SUFF(pHpet)->u64Config & HPET_CFG_LEGACY))
    365         return (pTimer->u8TimerNumber == 0) ? 2 : 8;
     363        return (pTimer->u8TimerNumber == 0) ? 0 : 8;
    366364    else
    367365        return (pTimer->u64Config & HPET_TN_INT_ROUTE_MASK) >> HPET_TN_INT_ROUTE_SHIFT;
     
    974972static void irqUpdate(struct HpetTimer *pTimer)
    975973{
    976     uint32_t irq     = getTimerIrq(pTimer);
     974    uint32_t irq    = getTimerIrq(pTimer);
    977975    HpetState* pThis = pTimer->CTX_SUFF(pHpet);
    978976
     
    990988        if ((pTimer->u64Config & HPET_TN_INT_TYPE) == HPET_TIMER_TYPE_EDGE)
    991989            pThis->pHpetHlpR3->pfnSetIrq(pThis->CTX_SUFF(pDevIns), irq, PDM_IRQ_LEVEL_FLIP_FLOP);
     990        else
     991            Assert(false);
    992992        /* @todo: implement IRQs in level-triggered mode */
    993993    }
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