VirtualBox

Changeset 91968 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 21, 2021 3:52:28 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147774
Message:

VMM,Devices: Replace remaining direct calls to VBoxVMM with device and driver callbacks, bugref:10074

File:
1 edited

Legend:

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

    r91960 r91968  
    4949#include <VBox/vmm/dbgf.h>
    5050#include <VBox/vmm/pgm.h> /* PGMR3HandlerPhysicalTypeRegister() argument types. */
     51#include <VBox/vmm/gim.h>
    5152#include <VBox/err.h>  /* VINF_EM_DBG_STOP, also 120+ source files expecting this. */
    5253#include <VBox/msi.h>
     
    24242425
    24252426/** Current PDMDEVHLPR3 version number. */
    2426 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 58, 0)
     2427#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 60, 0)
    24272428
    24282429/**
     
    45534554                                                         uint8_t *pcLinearAddrWidth));
    45544555
     4556    /**
     4557     * Gets the scalable bus frequency.
     4558     *
     4559     * The bus frequency is used as a base in several MSRs that gives the CPU and
     4560     * other frequency ratios.
     4561     *
     4562     * @returns Scalable bus frequency in Hz. Will not return CPUM_SBUSFREQ_UNKNOWN.
     4563     * @param   pDevIns             The device instance.
     4564     */
     4565    DECLR3CALLBACKMEMBER(uint64_t, pfnCpuGetGuestScalableBusFrequency,(PPDMDEVINS pDevIns));
     4566
    45554567    /** Space reserved for future members.
    45564568     * @{ */
     
    47494761     */
    47504762    DECLR3CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetNano,(PPDMDEVINS pDevIns));
     4763
     4764    /**
     4765     * Get the timestamp frequency.
     4766     *
     4767     * @returns Number of ticks per second.
     4768     * @param   pVM     The cross context VM structure.
     4769     */
     4770    DECLR3CALLBACKMEMBER(uint64_t, pfnTMCpuTicksPerSecond,(PPDMDEVINS pDevIns));
    47514771
    47524772    /**
     
    49544974     */
    49554975    DECLR3CALLBACKMEMBER(int, pfnQueryLun,(PPDMDEVINS pDevIns, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase));
     4976
     4977    /**
     4978     * Registers the GIM device with VMM.
     4979     *
     4980     * @param   pDevIns         Pointer to the GIM device instance.
     4981     * @param   pDbg            Pointer to the GIM device debug structure, can be
     4982     *                          NULL.
     4983     */
     4984    DECLR3CALLBACKMEMBER(void, pfnGIMDeviceRegister,(PPDMDEVINS pDevIns, PGIMDEBUG pDbg));
     4985
     4986    /**
     4987     * Gets debug setup specified by the provider.
     4988     *
     4989     * @returns VBox status code.
     4990     * @param   pDevIns         Pointer to the GIM device instance.
     4991     * @param   pDbgSetup       Where to store the debug setup details.
     4992     */
     4993    DECLR3CALLBACKMEMBER(int, pfnGIMGetDebugSetup,(PPDMDEVINS pDevIns, PGIMDEBUGSETUP pDbgSetup));
     4994
     4995    /**
     4996     * Returns the array of MMIO2 regions that are expected to be registered and
     4997     * later mapped into the guest-physical address space for the GIM provider
     4998     * configured for the VM.
     4999     *
     5000     * @returns Pointer to an array of GIM MMIO2 regions, may return NULL.
     5001     * @param   pDevIns         Pointer to the GIM device instance.
     5002     * @param   pcRegions       Where to store the number of items in the array.
     5003     *
     5004     * @remarks The caller does not own and therefore must -NOT- try to free the
     5005     *          returned pointer.
     5006     */
     5007    DECLR3CALLBACKMEMBER(PGIMMMIO2REGION, pfnGIMGetMmio2Regions,(PPDMDEVINS pDevIns, uint32_t *pcRegions));
    49565008
    49575009    /** @} */
     
    71397191{
    71407192    return pDevIns->CTX_SUFF(pHlp)->pfnCpuGetGuestMicroarch(pDevIns);
     7193}
     7194
     7195/**
     7196 * @copydoc PDMDEVHLPR3::pfnCpuGetGuestScalableBusFrequency
     7197 */
     7198DECLINLINE(uint64_t) PDMDevHlpCpuGetGuestScalableBusFrequency(PPDMDEVINS pDevIns)
     7199{
     7200    return pDevIns->CTX_SUFF(pHlp)->pfnCpuGetGuestScalableBusFrequency(pDevIns);
    71417201}
    71427202
     
    91659225
    91669226#ifdef IN_RING3
     9227/**
     9228 * @copydoc PDMDEVHLPR3::pfnTMCpuTicksPerSecond
     9229 */
     9230DECLINLINE(uint64_t) PDMDevHlpTMCpuTicksPerSecond(PPDMDEVINS pDevIns)
     9231{
     9232    return pDevIns->CTX_SUFF(pHlp)->pfnTMCpuTicksPerSecond(pDevIns);
     9233}
    91679234
    91689235/**
     
    93619428{
    93629429    return pDevIns->pHlpR3->pfnQueryLun(pDevIns, pszDevice, iInstance, iLun, ppBase);
     9430}
     9431
     9432/**
     9433 * @copydoc PDMDEVHLPR3::pfnGIMDeviceRegister
     9434 */
     9435DECLINLINE(void) PDMDevHlpGIMDeviceRegister(PPDMDEVINS pDevIns, PGIMDEBUG pDbg)
     9436{
     9437    pDevIns->pHlpR3->pfnGIMDeviceRegister(pDevIns, pDbg);
     9438}
     9439
     9440/**
     9441 * @copydoc PDMDEVHLPR3::pfnGIMGetDebugSetup
     9442 */
     9443DECLINLINE(int) PDMDevHlpGIMGetDebugSetup(PPDMDEVINS pDevIns, PGIMDEBUGSETUP pDbgSetup)
     9444{
     9445    return pDevIns->pHlpR3->pfnGIMGetDebugSetup(pDevIns, pDbgSetup);
     9446}
     9447
     9448/**
     9449 * @copydoc PDMDEVHLPR3::pfnGIMGetMmio2Regions
     9450 */
     9451DECLINLINE(PGIMMMIO2REGION) PDMDevHlpGIMGetMmio2Regions(PPDMDEVINS pDevIns, uint32_t *pcRegions)
     9452{
     9453    return pDevIns->pHlpR3->pfnGIMGetMmio2Regions(pDevIns, pcRegions);
    93639454}
    93649455
Note: See TracChangeset for help on using the changeset viewer.

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