VirtualBox

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


Ignore:
Timestamp:
Sep 10, 2014 11:04:10 AM (10 years ago)
Author:
vboxsync
Message:

VMM, Devices: Add interface to query the APIC frequency from the APIC device.

File:
1 edited

Legend:

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

    r52157 r52670  
    655655    Log2(("apicGetTPR: returns %#x\n", pApic->tpr));
    656656    return pApic->tpr;
     657}
     658
     659
     660PDMBOTHCBDECL(uint64_t) apicGetTimerFreq(PPDMDEVINS pDevIns)
     661{
     662    APICDeviceInfo *pDev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *);
     663    APICState *pApic = apicGetStateById(pDev, 0);
     664    uint64_t uTimer = TMTimerGetFreq(pApic->CTX_SUFF(pTimer));
     665    Log2(("apicGetTimerFreq: returns %#RX64\n", uTimer));
     666    return uTimer;
    657667}
    658668
     
    23012311    ApicReg.pfnBusDeliverR3         = apicBusDeliverCallback;
    23022312    ApicReg.pfnLocalInterruptR3     = apicLocalInterrupt;
     2313    ApicReg.pfnGetTimerFreqR3       = apicGetTimerFreq;
    23032314    if (fRZEnabled)
    23042315    {
     
    23132324        ApicReg.pszBusDeliverRC     = "apicBusDeliverCallback";
    23142325        ApicReg.pszLocalInterruptRC = "apicLocalInterrupt";
     2326        ApicReg.pszGetTimerFreqRC   = "apicGetTimerFreq";
    23152327
    23162328        ApicReg.pszGetInterruptR0   = "apicGetInterrupt";
     
    23242336        ApicReg.pszBusDeliverR0     = "apicBusDeliverCallback";
    23252337        ApicReg.pszLocalInterruptR0 = "apicLocalInterrupt";
     2338        ApicReg.pszGetTimerFreqR0   = "apicGetTimerFreq";
    23262339    }
    23272340    else
     
    23372350        ApicReg.pszBusDeliverRC     = NULL;
    23382351        ApicReg.pszLocalInterruptRC = NULL;
     2352        ApicReg.pszGetTimerFreqRC   = NULL;
    23392353
    23402354        ApicReg.pszGetInterruptR0   = NULL;
     
    23482362        ApicReg.pszBusDeliverR0     = NULL;
    23492363        ApicReg.pszLocalInterruptR0 = NULL;
     2364        ApicReg.pszGetTimerFreqR0   = NULL;
    23502365    }
    23512366
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