VirtualBox

Changeset 60396 in vbox for trunk/include


Ignore:
Timestamp:
Apr 8, 2016 4:17:15 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106482
Message:

VMMDev,PDM,HM: Changed the VMMDev heap interface a little so HM can init without the fake PCI BIOS code having run.

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

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

    r60387 r60396  
    6161VMM_INT_DECL(int)       PDMVmmDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys);
    6262VMM_INT_DECL(bool)      PDMVmmDevHeapIsEnabled(PVM pVM);
     63
     64/**
     65 * Mapping/unmapping callback for an VMMDev heap allocation.
     66 *
     67 * @param   pVM                 The cross context VM structure.
     68 * @param   pvAllocation        The allocation address (ring-3).
     69 * @param   GCPhysAllocation    The guest physical address of the mapping if
     70 *                              it's being mapped, NIL_RTGCPHYS if it's being
     71 *                              unmapped.
     72 */
     73typedef void FNPDMVMMDEVHEAPNOTIFY(PVM pVM, void *pvAllocation, RTGCPHYS GCPhysAllocation);
     74/** Pointer (ring-3) to a FNPDMVMMDEVHEAPNOTIFY function. */
     75typedef R3PTRTYPE(FNPDMVMMDEVHEAPNOTIFY *) PFNPDMVMMDEVHEAPNOTIFY;
    6376
    6477
     
    157170VMMR3DECL(void)         PDMR3DmaRun(PVM pVM);
    158171VMMR3_INT_DECL(int)     PDMR3LockCall(PVM pVM);
    159 VMMR3_INT_DECL(int)     PDMR3VmmDevHeapRegister(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize);
    160 VMMR3_INT_DECL(int)     PDMR3VmmDevHeapUnregister(PVM pVM, RTGCPHYS GCPhys);
    161 VMMR3_INT_DECL(int)     PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, RTR3PTR *ppv);
     172
     173VMMR3_INT_DECL(int)     PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, PFNPDMVMMDEVHEAPNOTIFY pfnNotify, RTR3PTR *ppv);
    162174VMMR3_INT_DECL(int)     PDMR3VmmDevHeapFree(PVM pVM, RTR3PTR pv);
    163175VMMR3_INT_DECL(int)     PDMR3TracingConfig(PVM pVM, const char *pszName, size_t cchName, bool fEnable, bool fApply);
  • trunk/include/VBox/vmm/pdmdev.h

    r60387 r60396  
    35523552
    35533553    /**
    3554      * Registers the VMM device heap
     3554     * Registers the VMM device heap or notifies about mapping/unmapping.
     3555     *
     3556     * This interface serves three purposes:
     3557     *
     3558     *      -# Register the VMM device heap during device construction
     3559     *         for the HM to use.
     3560     *      -# Notify PDM/HM that it's mapped into guest address
     3561     *         space (i.e. usable).
     3562     *      -# Notify PDM/HM that it is being unmapped from the guest
     3563     *         address space (i.e. not usable).
    35553564     *
    35563565     * @returns VBox status code.
    35573566     * @param   pDevIns             The device instance.
    3558      * @param   GCPhys              The physical address.
     3567     * @param   GCPhys              The physical address if mapped, NIL_RTGCPHYS if
     3568     *                              not mapped.
    35593569     * @param   pvHeap              Ring 3 heap pointer.
    3560      * @param   cbSize              Size of the heap.
     3570     * @param   cbHeap              Size of the heap.
    35613571     * @thread  EMT.
    35623572     */
    3563     DECLR3CALLBACKMEMBER(int, pfnRegisterVMMDevHeap,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize));
    3564 
    3565     /**
    3566      * Unregisters the VMM device heap
     3573    DECLR3CALLBACKMEMBER(int, pfnRegisterVMMDevHeap,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbHeap));
     3574
     3575    /**
     3576     * Unregisters the VMM device heap - OBSOLETE.
     3577     *
     3578     * This entry can be reused.
     3579     * This entry can be reused.
     3580     * This entry can be reused.
    35673581     *
    35683582     * @returns VBox status code.
     
    35703584     * @param   GCPhys              The physical address.
    35713585     * @thread  EMT.
     3586     * @obsolete
    35723587     */
    35733588    DECLR3CALLBACKMEMBER(int, pfnUnregisterVMMDevHeap,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys));
     
    52775292 * @copydoc PDMDEVHLPR3::pfnRegisterVMMDevHeap
    52785293 */
    5279 DECLINLINE(int) PDMDevHlpRegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize)
    5280 {
    5281     return pDevIns->pHlpR3->pfnRegisterVMMDevHeap(pDevIns, GCPhys, pvHeap, cbSize);
    5282 }
    5283 
    5284 /**
    5285  * @copydoc PDMDEVHLPR3::pfnUnregisterVMMDevHeap
    5286  */
    5287 DECLINLINE(int) PDMDevHlpUnregisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
    5288 {
    5289     return pDevIns->pHlpR3->pfnUnregisterVMMDevHeap(pDevIns, GCPhys);
     5294DECLINLINE(int) PDMDevHlpRegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbHeap)
     5295{
     5296    return pDevIns->pHlpR3->pfnRegisterVMMDevHeap(pDevIns, GCPhys, pvHeap, cbHeap);
    52905297}
    52915298
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