VirtualBox

Changeset 81156 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 8, 2019 2:58:45 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133790
Message:

IOM,PDMDevHlp: Started implementing new MMIO registration APIs. Splitting up IOM.cpp into I/O port and MMIO source files. bugref:9218

File:
1 edited

Legend:

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

    r81136 r81156  
    390390typedef FNIOMMMIOFILL *PFNIOMMMIOFILL;
    391391
     392
     393/**
     394 * Memory mapped I/O Handler for read operations.
     395 *
     396 * @returns Strict VBox status code.
     397 *
     398 * @param   pDevIns     The device instance.
     399 * @param   pvUser      User argument.
     400 * @param   off         Offset into the mapping of the read,
     401 *                      or the physical address if IOM_MMIO_F_ABS is active.
     402 * @param   pv          Where to store the result.
     403 * @param   cb          Number of bytes read.
     404 * @remarks Caller enters the device critical section.
     405 */
     406typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMMMIONEWREAD(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void *pv, uint32_t cb);
     407/** Pointer to a FNIOMMMIONEWREAD(). */
     408typedef FNIOMMMIONEWREAD *PFNIOMMMIONEWREAD;
     409
     410/**
     411 * Memory mapped I/O Handler for write operations.
     412 *
     413 * @returns Strict VBox status code.
     414 *
     415 * @param   pDevIns     The device instance.
     416 * @param   pvUser      User argument.
     417 * @param   off         Offset into the mapping of the write,
     418 *                      or the physical address if IOM_MMIO_F_ABS is active.
     419 * @param   pv          Where to fetch the result.
     420 * @param   cb          Number of bytes to write.
     421 * @remarks Caller enters the device critical section.
     422 */
     423typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMMMIONEWWRITE(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void const *pv, uint32_t cb);
     424/** Pointer to a FNIOMMMIONEWWRITE(). */
     425typedef FNIOMMMIONEWWRITE *PFNIOMMMIONEWWRITE;
     426
     427/**
     428 * Memory mapped I/O Handler for memset operations, actually for REP STOS* instructions handling.
     429 *
     430 * @returns Strict VBox status code.
     431 *
     432 * @param   pDevIns     The device instance.
     433 * @param   pvUser      User argument.
     434 * @param   off         Offset into the mapping of the fill,
     435 *                      or the physical address if IOM_MMIO_F_ABS is active.
     436 * @param   u32Item     Byte/Word/Dword data to fill.
     437 * @param   cbItem      Size of data in u32Item parameter, restricted to 1/2/4 bytes.
     438 * @param   cItems      Number of iterations.
     439 * @remarks Caller enters the device critical section.
     440 */
     441typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMMMIONEWFILL(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off,
     442                                                    uint32_t u32Item, uint32_t cbItem, uint32_t cItems);
     443/** Pointer to a FNIOMMMIONEWFILL(). */
     444typedef FNIOMMMIONEWFILL *PFNIOMMMIONEWFILL;
     445
    392446VMMDECL(VBOXSTRICTRC)   IOMIOPortRead(PVMCC pVM, PVMCPU pVCpu, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue);
    393447VMMDECL(VBOXSTRICTRC)   IOMIOPortWrite(PVMCC pVM, PVMCPU pVCpu, RTIOPORT Port, uint32_t u32Value, size_t cbValue);
     
    412466/** @} */
    413467
     468/** @name IOM_MMIO_F_XXX - Flags for IOMR3MmioCreate() and PDMDevHlpMmioCreateEx().
     469 * @{ */
     470/** Pass the absolute physical address (GC) to the callback rather than the
     471 * relative one. */
     472#define IOM_MMIO_F_ABS              RT_BIT_32(0)
     473/** Valid flags for IOMR3IoPortCreate(). */
     474#define IOM_MMIO_F_VALID_MASK       UINT32_C(0x00000001)
     475/** @} */
     476
    414477#ifdef IN_RING3
    415478/** @defgroup grp_iom_r3    The IOM Host Context Ring-3 API
     
    429492VMMR3_INT_DECL(int)  IOMR3IoPortUnmap(PVM pVM, PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts);
    430493
     494VMMR3_INT_DECL(int)  IOMR3MmioCreate(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS cbRegion, uint32_t fFlags, PPDMPCIDEV pPciDev,
     495                                     uint32_t iPciRegion, PFNIOMMMIONEWWRITE pfnWrite, PFNIOMMMIONEWREAD pfnRead,
     496                                     PFNIOMMMIONEWFILL pfnFill, void *pvUser, const char *pszDesc, PIOMMMIOHANDLE phRegion);
     497VMMR3_INT_DECL(int)  IOMR3MmioMap(PVM pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS GCPhys);
     498VMMR3_INT_DECL(int)  IOMR3MmioUnmap(PVM pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion);
     499VMMR3_INT_DECL(int)  IOMR3MmioReduce(PVM pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS cbRegion);
     500
     501/** @name obsolete
     502 * @deprecated
     503 * @{ */
    431504VMMR3_INT_DECL(int)  IOMR3IOPortRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTHCPTR pvUser,
    432505                                           R3PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R3PTRTYPE(PFNIOMIOPORTIN) pfnInCallback,
     
    479552VMMR3_INT_DECL(void) IOMR3MmioExNotifyDeregistered(PVM pVM, void *pvUser);
    480553
     554/** @} */
     555
    481556VMMR3_INT_DECL(VBOXSTRICTRC) IOMR3ProcessForceFlag(PVM pVM, PVMCPU pVCpu, VBOXSTRICTRC rcStrict);
    482557
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