VirtualBox

Changeset 82313 in vbox for trunk/include


Ignore:
Timestamp:
Dec 1, 2019 3:38:40 AM (5 years ago)
Author:
vboxsync
Message:

IOM,PDMDevHlp: Kicked out the old MMIO code. bugref:9218

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

Legend:

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

    r82311 r82313  
    457457VMMDECL(VBOXSTRICTRC)   IOMMMIORead(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, uint32_t *pu32Value, size_t cbValue);
    458458VMMDECL(VBOXSTRICTRC)   IOMMMIOWrite(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, uint32_t u32Value, size_t cbValue);
    459 /*VMMDECL(int)            IOMMMIOMapMMIO2Page(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysRemapped, uint64_t fPageFlags);*/
    460 /*VMMDECL(int)            IOMMMIOMapMMIOHCPage(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, RTHCPHYS HCPhys, uint64_t fPageFlags); - not used any more */
    461 /*VMMDECL(int)            IOMMMIOResetRegion(PVMCC pVM, RTGCPHYS GCPhys);*/
    462 
    463459VMM_INT_DECL(VBOXSTRICTRC) IOMR0MmioPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault);
    464460VMMDECL(int)            IOMMmioMapMmio2Page(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS offRegion,
     
    504500VMMR3_INT_DECL(RTGCPHYS) IOMR3MmioGetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion);
    505501
    506 /** @name obsolete
    507  * @deprecated
    508  * @{ */
    509 VMMR3_INT_DECL(int)  IOMR3MmioRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser,
    510                                          R3PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback,
    511                                          R3PTRTYPE(PFNIOMMMIOREAD)  pfnReadCallback,
    512                                          R3PTRTYPE(PFNIOMMMIOFILL)  pfnFillCallback,
    513                                          uint32_t fFlags, const char *pszDesc);
    514 VMMR3_INT_DECL(int)  IOMR3MmioRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser,
    515                                          R0PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback,
    516                                          R0PTRTYPE(PFNIOMMMIOREAD)  pfnReadCallback,
    517                                          R0PTRTYPE(PFNIOMMMIOFILL)  pfnFillCallback);
    518 #if 0
    519 VMMR3_INT_DECL(int)  IOMR3MmioRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTGCPTR pvUser,
    520                                          RCPTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback,
    521                                          RCPTRTYPE(PFNIOMMMIOREAD)  pfnReadCallback,
    522                                          RCPTRTYPE(PFNIOMMMIOFILL)  pfnFillCallback);
    523 #endif
    524 VMMR3_INT_DECL(int)  IOMR3MmioDeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange);
    525 VMMR3_INT_DECL(int)  IOMR3MmioExNotifyMapped(PVM pVM, void *pvUser, RTGCPHYS GCPhys);
    526 VMMR3_INT_DECL(void) IOMR3MmioExNotifyUnmapped(PVM pVM, void *pvUser, RTGCPHYS GCPhys);
    527 VMMR3_INT_DECL(void) IOMR3MmioExNotifyDeregistered(PVM pVM, void *pvUser);
    528 
    529 /** @} */
    530 
    531502VMMR3_INT_DECL(VBOXSTRICTRC) IOMR3ProcessForceFlag(PVM pVM, PVMCPU pVCpu, VBOXSTRICTRC rcStrict);
    532503
    533504VMMR3_INT_DECL(void) IOMR3NotifyBreakpointCountChange(PVM pVM, bool fPortIo, bool fMmio);
    534505VMMR3_INT_DECL(void) IOMR3NotifyDebugEventChange(PVM pVM, DBGFEVENT enmEvent, bool fEnabled);
    535 
    536506/** @} */
    537507#endif /* IN_RING3 */
  • trunk/include/VBox/vmm/pdmdev.h

    r82311 r82313  
    19751975
    19761976/** Current PDMDEVHLPR3 version number. */
    1977 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 39, 0)
     1977#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 40, 0)
    19781978
    19791979/**
     
    21542154    DECLR3CALLBACKMEMBER(RTGCPHYS, pfnMmioGetMappingAddress,(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion));
    21552155    /** @} */
    2156 
    2157     /**
    2158      * Register a Memory Mapped I/O (MMIO) region.
    2159      *
    2160      * These callbacks are of course for the ring-3 context (R3). Register HC
    2161      * handlers before raw-mode context (RC) and ring-0 context (R0) handlers! There
    2162      * must be a R3 handler for every RC and R0 handler!
    2163      *
    2164      * @returns VBox status.
    2165      * @param   pDevIns             The device instance to register the MMIO with.
    2166      * @param   GCPhysStart         First physical address in the range.
    2167      * @param   cbRange             The size of the range (in bytes).
    2168      * @param   pvUser              User argument.
    2169      * @param   pfnWrite            Pointer to function which is gonna handle Write operations.
    2170      * @param   pfnRead             Pointer to function which is gonna handle Read operations.
    2171      * @param   pfnFill             Pointer to function which is gonna handle Fill/memset operations. (optional)
    2172      * @param   fFlags              Flags, IOMMMIO_FLAGS_XXX.
    2173      * @param   pszDesc             Pointer to description string. This must not be freed.
    2174      * @remarks Caller enters the device critical section prior to invoking the
    2175      *          registered callback methods.
    2176      * @deprecated
    2177      */
    2178     DECLR3CALLBACKMEMBER(int, pfnMMIORegister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser,
    2179                                                PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill,
    2180                                                uint32_t fFlags, const char *pszDesc));
    2181 
    2182     /**
    2183      * Register a Memory Mapped I/O (MMIO) region for RC.
    2184      *
    2185      * These callbacks are for the raw-mode context (RC). Register ring-3 context
    2186      * (R3) handlers before guest context handlers! There must be a R3 handler for
    2187      * every RC handler!
    2188      *
    2189      * @returns VBox status.
    2190      * @param   pDevIns             The device instance to register the MMIO with.
    2191      * @param   GCPhysStart         First physical address in the range.
    2192      * @param   cbRange             The size of the range (in bytes).
    2193      * @param   pvUser              User argument.
    2194      * @param   pszWrite            Name of the RC function which is gonna handle Write operations.
    2195      * @param   pszRead             Name of the RC function which is gonna handle Read operations.
    2196      * @param   pszFill             Name of the RC function which is gonna handle Fill/memset operations. (optional)
    2197      * @remarks Caller enters the device critical section prior to invoking the
    2198      *          registered callback methods.
    2199      * @deprecated
    2200      */
    2201     DECLR3CALLBACKMEMBER(int, pfnMMIORegisterRC,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTRCPTR pvUser,
    2202                                                  const char *pszWrite, const char *pszRead, const char *pszFill));
    2203 
    2204     /**
    2205      * Register a Memory Mapped I/O (MMIO) region for R0.
    2206      *
    2207      * These callbacks are for the ring-0 host context (R0).  Register ring-3
    2208      * constext (R3) handlers before R0 handlers!  There must be a R3 handler for
    2209      * every R0 handler!
    2210      *
    2211      * @returns VBox status.
    2212      * @param   pDevIns             The device instance to register the MMIO with.
    2213      * @param   GCPhysStart         First physical address in the range.
    2214      * @param   cbRange             The size of the range (in bytes).
    2215      * @param   pvUser              User argument. (if pointer, then it must be in locked memory!)
    2216      * @param   pszWrite            Name of the RC function which is gonna handle Write operations.
    2217      * @param   pszRead             Name of the RC function which is gonna handle Read operations.
    2218      * @param   pszFill             Name of the RC function which is gonna handle Fill/memset operations. (optional)
    2219      * @remarks Caller enters the device critical section prior to invoking the
    2220      *          registered callback methods.
    2221      * @deprecated
    2222      */
    2223     DECLR3CALLBACKMEMBER(int, pfnMMIORegisterR0,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser,
    2224                                                  const char *pszWrite, const char *pszRead, const char *pszFill));
    2225 
    2226     /**
    2227      * Deregister a Memory Mapped I/O (MMIO) region.
    2228      *
    2229      * This naturally affects both guest context (GC), ring-0 (R0) and ring-3 (R3/HC) handlers.
    2230      *
    2231      * @returns VBox status.
    2232      * @param   pDevIns             The device instance owning the MMIO region(s).
    2233      * @param   GCPhysStart         First physical address in the range.
    2234      * @param   cbRange             The size of the range (in bytes).
    2235      * @deprecated
    2236      */
    2237     DECLR3CALLBACKMEMBER(int, pfnMMIODeregister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange));
    22382156
    22392157    /** @name MMIO2
     
    57335651
    57345652/**
    5735  * Register a Memory Mapped I/O (MMIO) region.
    5736  *
    5737  * These callbacks are of course for the ring-3 context (R3). Register HC
    5738  * handlers before raw-mode context (RC) and ring-0 context (R0) handlers! There
    5739  * must be a R3 handler for every RC and R0 handler!
    5740  *
    5741  * @returns VBox status.
    5742  * @param   pDevIns             The device instance to register the MMIO with.
    5743  * @param   GCPhysStart         First physical address in the range.
    5744  * @param   cbRange             The size of the range (in bytes).
    5745  * @param   pvUser              User argument.
    5746  * @param   fFlags              Flags, IOMMMIO_FLAGS_XXX.
    5747  * @param   pfnWrite            Pointer to function which is gonna handle Write operations.
    5748  * @param   pfnRead             Pointer to function which is gonna handle Read operations.
    5749  * @param   pszDesc             Pointer to description string. This must not be freed.
    5750  */
    5751 DECLINLINE(int) PDMDevHlpMMIORegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser,
    5752                                       uint32_t fFlags, PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, const char *pszDesc)
    5753 {
    5754     return pDevIns->pHlpR3->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, NULL /*pfnFill*/,
    5755                                             fFlags, pszDesc);
    5756 }
    5757 
    5758 /**
    5759  * Register a Memory Mapped I/O (MMIO) region for RC.
    5760  *
    5761  * These callbacks are for the raw-mode context (RC). Register ring-3 context
    5762  * (R3) handlers before guest context handlers! There must be a R3 handler for
    5763  * every RC handler!
    5764  *
    5765  * @returns VBox status.
    5766  * @param   pDevIns             The device instance to register the MMIO with.
    5767  * @param   GCPhysStart         First physical address in the range.
    5768  * @param   cbRange             The size of the range (in bytes).
    5769  * @param   pvUser              User argument.
    5770  * @param   pszWrite            Name of the RC function which is gonna handle Write operations.
    5771  * @param   pszRead             Name of the RC function which is gonna handle Read operations.
    5772  */
    5773 DECLINLINE(int) PDMDevHlpMMIORegisterRC(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTRCPTR pvUser,
    5774                                         const char *pszWrite, const char *pszRead)
    5775 {
    5776     return pDevIns->pHlpR3->pfnMMIORegisterRC(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, NULL /*pszFill*/);
    5777 }
    5778 
    5779 /**
    5780  * Register a Memory Mapped I/O (MMIO) region for R0.
    5781  *
    5782  * These callbacks are for the ring-0 host context (R0).  Register ring-3
    5783  * constext (R3) handlers before R0 handlers!  There must be a R3 handler for
    5784  * every R0 handler!
    5785  *
    5786  * @returns VBox status.
    5787  * @param   pDevIns             The device instance to register the MMIO with.
    5788  * @param   GCPhysStart         First physical address in the range.
    5789  * @param   cbRange             The size of the range (in bytes).
    5790  * @param   pvUser              User argument. (if pointer, then it must be in locked memory!)
    5791  * @param   pszWrite            Name of the RC function which is gonna handle Write operations.
    5792  * @param   pszRead             Name of the RC function which is gonna handle Read operations.
    5793  * @remarks Caller enters the device critical section prior to invoking the
    5794  *          registered callback methods.
    5795  */
    5796 DECLINLINE(int) PDMDevHlpMMIORegisterR0(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser,
    5797                                         const char *pszWrite, const char *pszRead)
    5798 {
    5799     return pDevIns->pHlpR3->pfnMMIORegisterR0(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, NULL /*pszFill*/);
    5800 }
    5801 
    5802 /**
    5803  * @copydoc PDMDEVHLPR3::pfnMMIORegister
    5804  */
    5805 DECLINLINE(int) PDMDevHlpMMIORegisterEx(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser,
    5806                                         uint32_t fFlags, PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead,
    5807                                         PFNIOMMMIOFILL pfnFill, const char *pszDesc)
    5808 {
    5809     return pDevIns->pHlpR3->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill,
    5810                                             fFlags, pszDesc);
    5811 }
    5812 
    5813 /**
    5814  * @copydoc PDMDEVHLPR3::pfnMMIORegisterRC
    5815  */
    5816 DECLINLINE(int) PDMDevHlpMMIORegisterRCEx(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTRCPTR pvUser,
    5817                                           const char *pszWrite, const char *pszRead, const char *pszFill)
    5818 {
    5819     return pDevIns->pHlpR3->pfnMMIORegisterRC(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill);
    5820 }
    5821 
    5822 /**
    5823  * @copydoc PDMDEVHLPR3::pfnMMIORegisterR0
    5824  */
    5825 DECLINLINE(int) PDMDevHlpMMIORegisterR0Ex(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser,
    5826                                           const char *pszWrite, const char *pszRead, const char *pszFill)
    5827 {
    5828     return pDevIns->pHlpR3->pfnMMIORegisterR0(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill);
    5829 }
    5830 
    5831 /**
    5832  * @copydoc PDMDEVHLPR3::pfnMMIODeregister
    5833  */
    5834 DECLINLINE(int) PDMDevHlpMMIODeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange)
    5835 {
    5836     return pDevIns->pHlpR3->pfnMMIODeregister(pDevIns, GCPhysStart, cbRange);
    5837 }
    5838 
    5839 /**
    58405653 * @copydoc PDMDEVHLPR3::pfnMmio2Create
    58415654 */
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