VirtualBox

Changeset 40937 in vbox


Ignore:
Timestamp:
Apr 16, 2012 10:36:10 AM (13 years ago)
Author:
vboxsync
Message:

Tag the APIC timer IRQs.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmdev.h

    r40907 r40937  
    14381438
    14391439    /**
     1440     * Calculates an IRQ tag for a timer event.
     1441     * 
     1442     * @returns The IRQ tag.
     1443     * @param   pDevIns         Device instance of the APIC.
     1444     */
     1445    DECLR3CALLBACKMEMBER(uint32_t, pfnCalcIrqTag,(PPDMDEVINS pDevIns));
     1446
     1447    /**
    14401448     * Modifies APIC-related bits in the CPUID feature mask.
    14411449     *
     
    15251533
    15261534/** Current PDMAPICHLP version number. */
    1527 #define PDM_APICHLPR3_VERSION                   PDM_VERSION_MAKE(0xfff3, 1, 0)
     1535#define PDM_APICHLPR3_VERSION                   PDM_VERSION_MAKE(0xfff3, 2, 0)
    15281536
    15291537
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r40907 r40937  
    16991699    if (!(pApic->lvt[APIC_LVT_TIMER] & APIC_LVT_MASKED)) {
    17001700        LogFlow(("apic_timer: trigger irq\n"));
    1701         apic_set_irq(pDev, pApic, pApic->lvt[APIC_LVT_TIMER] & 0xff, APIC_TRIGGER_EDGE, 0 /*uTagSrc*/);
     1701        apic_set_irq(pDev, pApic, pApic->lvt[APIC_LVT_TIMER] & 0xff, APIC_TRIGGER_EDGE,
     1702                     pDev->CTX_SUFF(pApicHlp)->pfnCalcIrqTag(pDevIns));
    17021703
    17031704        if (   (pApic->lvt[APIC_LVT_TIMER] & APIC_LVT_TIMER_PERIODIC)
  • trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp

    r40907 r40937  
    239239
    240240
     241/** @interface_method_impl{PDMAPICHLPR3,pfnCalcIrqTag} */
     242static DECLCALLBACK(uint32_t) pdmR3ApicHlp_CalcIrqTag(PPDMDEVINS pDevIns)
     243{
     244    PDMDEV_ASSERT_DEVINS(pDevIns);
     245    PVM pVM = pDevIns->Internal.s.pVMR3;
     246
     247    pdmLock(pVM);
     248    uint32_t uTagSrc = pdmCalcIrqTag(pVM, pDevIns->idTracing);
     249    pdmUnlock(pVM);
     250
     251    LogFlow(("pdmR3ApicHlp_CalcIrqTag: caller='%s'/%d: returns %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, uTagSrc));
     252    return uTagSrc;
     253}
     254
     255
    241256/** @interface_method_impl{PDMAPICHLPR3,pfnChangeFeature} */
    242257static DECLCALLBACK(void) pdmR3ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion)
     
    359374    pdmR3ApicHlp_SetInterruptFF,
    360375    pdmR3ApicHlp_ClearInterruptFF,
     376    pdmR3ApicHlp_CalcIrqTag,
    361377    pdmR3ApicHlp_ChangeFeature,
    362378    pdmR3ApicHlp_GetCpuId,
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