VirtualBox

Changeset 81525 in vbox for trunk/include


Ignore:
Timestamp:
Oct 25, 2019 9:53:00 AM (5 years ago)
Author:
vboxsync
Message:

PDM/DevHlp: Adding PDMDevHlpTimerDestroy and PDMDevHlpPCIIORegionCreateMmio. bugref:9218

File:
1 edited

Legend:

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

    r81519 r81525  
    22762276
    22772277/** Current PDMDEVHLPR3 version number. */
    2278 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 27, 0)
     2278#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 28, 0)
    22792279
    22802280/**
     
    29922992    DECLR3CALLBACKMEMBER(int,      pfnTimerSave,(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM));
    29932993    DECLR3CALLBACKMEMBER(int,      pfnTimerLoad,(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM));
     2994    DECLR3CALLBACKMEMBER(int,      pfnTimerDestroy,(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer));
    29942995    /** @} */
    29952996
     
    63726373
    63736374/**
     6375 * @copydoc PDMDEVHLPR3::pfnTimerDestroy
     6376 */
     6377DECLINLINE(int) PDMDevHlpTimerDestroy(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
     6378{
     6379    return pDevIns->pHlpR3->pfnTimerDestroy(pDevIns, hTimer);
     6380}
     6381
     6382/**
    63746383 * @copydoc PDMDEVHLPR3::pfnTMUtcNow
    63756384 */
     
    67246733
    67256734/**
    6726  * Registers an MMIO port region for the default PCI device.
     6735 * Registers an MMIO region for the default PCI device.
    67276736 *
    67286737 * @returns VBox status code.
     
    67466755}
    67476756
     6757/**
     6758 * Combines PDMDevHlpMmioCreate and PDMDevHlpPCIIORegionRegisterMmio, creating
     6759 * and registering an MMIO region for the default PCI device.
     6760 *
     6761 * @returns VBox status code.
     6762 * @param   pDevIns         The device instance to register the ports with.
     6763 * @param   cbRegion        The size of the region in bytes.
     6764 * @param   iPciRegion      The PCI device region in the high 16-bit word and
     6765 *                          sub-region in the low 16-bit word.  UINT32_MAX if NA.
     6766 * @param   enmType         PCI_ADDRESS_SPACE_MEM or
     6767 *                          PCI_ADDRESS_SPACE_MEM_PREFETCH, optionally or-ing in
     6768 *                          PCI_ADDRESS_SPACE_BAR64 or PCI_ADDRESS_SPACE_BAR32.
     6769 * @param   fFlags          Flags, IOMMMIO_FLAGS_XXX.
     6770 * @param   pfnWrite        Pointer to function which is gonna handle Write
     6771 *                          operations.
     6772 * @param   pfnRead         Pointer to function which is gonna handle Read
     6773 *                          operations.
     6774 * @param   pvUser          User argument to pass to the callbacks.
     6775 * @param   pszDesc         Pointer to description string. This must not be freed.
     6776 * @param   phRegion        Where to return the MMIO region handle.
     6777 *
     6778 */
     6779DECLINLINE(int) PDMDevHlpPCIIORegionCreateMmio(PPDMDEVINS pDevIns, uint32_t iPciRegion, RTGCPHYS cbRegion, PCIADDRESSSPACE enmType,
     6780                                               PFNIOMMMIONEWWRITE pfnWrite, PFNIOMMMIONEWREAD pfnRead, void *pvUser,
     6781                                               uint32_t fFlags, const char *pszDesc, PIOMMMIOHANDLE phRegion)
     6782
     6783{
     6784    int rc = pDevIns->pHlpR3->pfnMmioCreateEx(pDevIns, cbRegion, fFlags, pDevIns->apPciDevs[0], iPciRegion,
     6785                                              pfnWrite, pfnRead, NULL /*pfnFill*/, pvUser, pszDesc, phRegion);
     6786    if (RT_SUCCESS(rc))
     6787        rc = pDevIns->pHlpR3->pfnPCIIORegionRegister(pDevIns, pDevIns->apPciDevs[0], iPciRegion, cbRegion, enmType,
     6788                                                     PDMPCIDEV_IORGN_F_MMIO_HANDLE, *phRegion, NULL /*pfnCallback*/);
     6789    return rc;
     6790}
     6791
    67486792
    67496793/**
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