VirtualBox

Changeset 13367 in vbox for trunk/include


Ignore:
Timestamp:
Oct 17, 2008 11:19:29 AM (16 years ago)
Author:
vboxsync
Message:

Added new devhlp functions.

File:
1 edited

Legend:

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

    r13074 r13367  
    27672767    DECLR3CALLBACKMEMBER(int, pfnUnregisterVMMDevHeap,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys));
    27682768
     2769    /**
     2770     * Register a Memory Mapped I/O (MMIO) region with backing memory.
     2771     *
     2772     * These callbacks are of course for the host context (HC).
     2773     * Register HC handlers before guest context (GC) handlers! There must be a
     2774     * HC handler for every GC handler!
     2775     *
     2776     * @returns VBox status.
     2777     * @param   pDevIns             The device instance to register the MMIO with.
     2778     * @param   GCPhysStart         First physical address in the range.
     2779     * @param   cbRange             The size of the range (in bytes).
     2780     * @param   pvUser              User argument.
     2781     * @param   pfnWrite            Pointer to function which is gonna handle Write operations.
     2782     * @param   pfnRead             Pointer to function which is gonna handle Read operations.
     2783     * @param   pfnFill             Pointer to function which is gonna handle Fill/memset operations. (optional)
     2784     * @param   pszDesc             Pointer to description string. This must not be freed.
     2785     */
     2786    DECLR3CALLBACKMEMBER(int, pfnMMIORegisterEx,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser,
     2787                                                 PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill,
     2788                                                 const char *pszDesc));
     2789
    27692790    /** @} */
    27702791
     
    28982919    DECLRCCALLBACKMEMBER(int, pfnPATMSetMMIOPatchInfo,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPTR pCachedData));
    28992920
     2921    /**
     2922     * Gets the VM handle. Restricted API.
     2923     *
     2924     * @returns VM Handle.
     2925     * @param   pDevIns         Device instance.
     2926     */
     2927    DECLRCCALLBACKMEMBER(PVM, pfnGetVM,(PPDMDEVINS pDevIns));
     2928
    29002929    /** Just a safety precaution. */
    29012930    uint32_t                        u32TheEnd;
     
    30253054     */
    30263055    DECLR0CALLBACKMEMBER(int, pfnPATMSetMMIOPatchInfo,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPTR pCachedData));
     3056
     3057    /**
     3058     * Gets the VM handle. Restricted API.
     3059     *
     3060     * @returns VM Handle.
     3061     * @param   pDevIns         Device instance.
     3062     */
     3063    DECLR0CALLBACKMEMBER(PVM, pfnGetVM,(PPDMDEVINS pDevIns));
    30273064
    30283065    /** Just a safety precaution. */
     
    32283265
    32293266/**
     3267 * @copydoc PDMDEVHLPR3::pfnMMIORegisterEx
     3268 */
     3269DECLINLINE(int) PDMDevHlpMMIORegisterEx(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser,
     3270                                        PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill,
     3271                                        const char *pszDesc)
     3272{
     3273    return pDevIns->pDevHlpR3->pfnMMIORegisterEx(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc);
     3274}
     3275
     3276/**
    32303277 * @copydoc PDMDEVHLPR3::pfnMMIORegisterGC
    32313278 */
     
    34483495
    34493496/**
    3450  * @copydoc PDMDEVHLPR3::pfnGetVM
    3451  */
    3452 DECLINLINE(PVM) PDMDevHlpGetVM(PPDMDEVINS pDevIns)
    3453 {
    3454     return pDevIns->pDevHlpR3->pfnGetVM(pDevIns);
    3455 }
    3456 
    3457 /**
    34583497 * @copydoc PDMDEVHLPR3::pfnPhysReadGCVirt
    34593498 */
     
    36093648#endif /* IN_RING3 */
    36103649
     3650
     3651/**
     3652 * @copydoc PDMDEVHLPR3::pfnGetVM
     3653 */
     3654DECLINLINE(PVM) PDMDevHlpGetVM(PPDMDEVINS pDevIns)
     3655{
     3656    return pDevIns->CTX_SUFF(pDevHlp)->pfnGetVM(pDevIns);
     3657}
    36113658
    36123659/**
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