VirtualBox

Changeset 7725 in vbox


Ignore:
Timestamp:
Apr 3, 2008 2:28:09 PM (17 years ago)
Author:
vboxsync
Message:

stripped duplicate doxygen docs.

File:
1 edited

Legend:

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

    r7133 r7725  
    197197
    198198
    199 
    200 /**
    201  * Registers a Port IO GC handler.
    202  *
    203  * This API is called by PDM on behalf of a device. Devices must first register HC ranges
    204  * using IOMR3IOPortRegisterHC() before calling this function.
    205  *
    206  *
    207  * @returns VBox status code.
    208  *
    209  * @param   pVM                 VM handle.
    210  * @param   pDevIns             PDM device instance owning the port range.
    211  * @param   PortStart           First port number in the range.
    212  * @param   cPorts              Number of ports to register.
    213  * @param   pvUser              User argument for the callbacks.
    214  * @param   pfnOutCallback      Pointer to function which is gonna handle OUT operations in GC.
    215  * @param   pfnInCallback       Pointer to function which is gonna handle IN operations in GC.
    216  * @param   pfnOutStrCallback   Pointer to function which is gonna handle OUT operations in GC.
    217  * @param   pfnInStrCallback    Pointer to function which is gonna handle IN operations in GC.
    218  * @param   pszDesc             Pointer to description string. This must not be freed.
    219  */
    220199IOMDECL(int)  IOMIOPortRegisterGC(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTGCPTR pvUser,
    221200                                  GCPTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, GCPTRTYPE(PFNIOMIOPORTIN) pfnInCallback,
    222201                                  GCPTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, GCPTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback,
    223202                                  const char *pszDesc);
    224 
    225 
    226 
    227 /**
    228  * Registers a Memory Mapped I/O GC handler range.
    229  *
    230  * This API is called by PDM on behalf of a device. Devices must first register HC ranges
    231  * using IOMMR3MIORegisterHC() before calling this function.
    232  *
    233  *
    234  * @returns VBox status code.
    235  *
    236  * @param   pVM                 VM handle.
    237  * @param   pDevIns             PDM device instance owning the MMIO range.
    238  * @param   GCPhysStart         First physical address in the range.
    239  * @param   cbRange             The size of the range (in bytes).
    240  * @param   pvUser              User argument for the callbacks.
    241  * @param   pfnWriteCallback    Pointer to function which is gonna handle Write operations.
    242  * @param   pfnReadCallback     Pointer to function which is gonna handle Read operations.
    243  * @param   pfnFillCallback     Pointer to function which is gonna handle Fill/memset operations.
    244  * @param   pszDesc             Pointer to description string. This must not be freed.
    245  */
    246203IOMDECL(int)  IOMMMIORegisterGC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTGCPTR pvUser,
    247204                                GCPTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, GCPTRTYPE(PFNIOMMMIOREAD) pfnReadCallback,
    248205                                GCPTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc);
    249206
    250 
    251 /**
    252  * Registers a Port IO R0 handler.
    253  *
    254  * This API is called by PDM on behalf of a device. Devices must first register ring-3 ranges
    255  * using IOMR3IOPortRegisterR3() before calling this function.
    256  *
    257  *
    258  * @returns VBox status code.
    259  *
    260  * @param   pVM                 VM handle.
    261  * @param   pDevIns             PDM device instance owning the port range.
    262  * @param   PortStart           First port number in the range.
    263  * @param   cPorts              Number of ports to register.
    264  * @param   pvUser              User argument for the callbacks.
    265  * @param   pfnOutCallback      Pointer to function which is gonna handle OUT operations in GC.
    266  * @param   pfnInCallback       Pointer to function which is gonna handle IN operations in GC.
    267  * @param   pfnOutStrCallback   Pointer to function which is gonna handle OUT operations in GC.
    268  * @param   pfnInStrCallback    Pointer to function which is gonna handle IN operations in GC.
    269  * @param   pszDesc             Pointer to description string. This must not be freed.
    270  */
    271207IOMDECL(int)  IOMIOPortRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTR0PTR pvUser,
    272208                                  R0PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R0PTRTYPE(PFNIOMIOPORTIN) pfnInCallback,
    273209                                  R0PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, R0PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback,
    274210                                  const char *pszDesc);
    275 
    276 /**
    277  * Registers a Memory Mapped I/O R0 handler range.
    278  *
    279  * This API is called by PDM on behalf of a device. Devices must first register ring-3 ranges
    280  * using IOMMR3MIORegisterR3() before calling this function.
    281  *
    282  *
    283  * @returns VBox status code.
    284  *
    285  * @param   pVM                 VM handle.
    286  * @param   pDevIns             PDM device instance owning the MMIO range.
    287  * @param   GCPhysStart         First physical address in the range.
    288  * @param   cbRange             The size of the range (in bytes).
    289  * @param   pvUser              User argument for the callbacks.
    290  * @param   pfnWriteCallback    Pointer to function which is gonna handle Write operations.
    291  * @param   pfnReadCallback     Pointer to function which is gonna handle Read operations.
    292  * @param   pfnFillCallback     Pointer to function which is gonna handle Fill/memset operations.
    293  * @param   pszDesc             Pointer to description string. This must not be freed.
    294  */
    295211IOMDECL(int)  IOMMMIORegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser,
    296212                                R0PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, R0PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback,
    297213                                R0PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc);
    298 
    299 
    300 /**
    301  * Reads an I/O port register.
    302  *
    303  * @returns Strict VBox status code. Informational status codes other than the one documented
    304  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    305  * @retval  VINF_SUCCESS                Success.
    306  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    307  *                                      status code must be passed on to EM.
    308  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
    309  *
    310  * @param   pVM         VM handle.
    311  * @param   Port        The port to read.
    312  * @param   pu32Value   Where to store the value read.
    313  * @param   cbValue     The size of the register to read in bytes. 1, 2 or 4 bytes.
    314  */
    315 IOMDECL(int) IOMIOPortRead(PVM pVM, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue);
    316 
    317 /**
    318  * Writes to an I/O port register.
    319  *
    320  * @returns Strict VBox status code. Informational status codes other than the one documented
    321  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    322  * @retval  VINF_SUCCESS                Success.
    323  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    324  *                                      status code must be passed on to EM.
    325  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
    326  *
    327  * @param   pVM         VM handle.
    328  * @param   Port        The port to write to.
    329  * @param   u32Value    The value to write.
    330  * @param   cbValue     The size of the register to read in bytes. 1, 2 or 4 bytes.
    331  */
    332 IOMDECL(int) IOMIOPortWrite(PVM pVM, RTIOPORT Port, uint32_t u32Value, size_t cbValue);
    333 
    334 /**
    335  * OUT <DX|imm16>, <AL|AX|EAX>
    336  *
    337  * @returns Strict VBox status code. Informational status codes other than the one documented
    338  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    339  * @retval  VINF_SUCCESS                Success.
    340  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    341  *                                      status code must be passed on to EM.
    342  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
    343  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    344  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    345  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    346  *
    347  * @param   pVM         The virtual machine (GC pointer ofcourse).
    348  * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
    349  * @param   pCpu        Disassembler CPU state.
    350  */
    351 IOMDECL(int) IOMInterpretOUT(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
    352 
    353 /**
    354  * IN <AL|AX|EAX>, <DX|imm16>
    355  *
    356  * @returns Strict VBox status code. Informational status codes other than the one documented
    357  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    358  * @retval  VINF_SUCCESS                Success.
    359  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    360  *                                      status code must be passed on to EM.
    361  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
    362  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    363  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    364  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    365  *
    366  * @param   pVM         The virtual machine (GC pointer ofcourse).
    367  * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
    368  * @param   pCpu        Disassembler CPU state.
    369  */
    370 IOMDECL(int) IOMInterpretIN(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
    371 
    372 
    373 /**
    374  * Reads the string buffer of an I/O port register.
    375  *
    376  * @returns Strict VBox status code. Informational status codes other than the one documented
    377  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    378  * @retval  VINF_SUCCESS                Success.
    379  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    380  *                                      status code must be passed on to EM.
    381  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
    382  *
    383  * @param   pVM         VM handle.
    384  * @param   Port        The port to read.
    385  * @param   pGCPtrDst   Pointer to the destination buffer (GC, incremented appropriately).
    386  * @param   pcTransfers Pointer to the number of transfer units to read, on return remaining transfer units.
    387  * @param   cb          Size of the transfer unit (1, 2 or 4 bytes).
    388  */
    389 IOMDECL(int) IOMIOPortReadString(PVM pVM, RTIOPORT Port, PRTGCPTR pGCPtrDst, PRTGCUINTREG pcTransfers, unsigned cb);
    390 
    391 /**
    392  * Writes the string buffer of an I/O port register.
    393  *
    394  * @returns Strict VBox status code. Informational status codes other than the one documented
    395  *          here are to be treated as internal failure.
    396  * @retval  VINF_SUCCESS                Success.
    397  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
    398  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
    399  *
    400  * @param   pVM         VM handle.
    401  * @param   Port        The port to write.
    402  * @param   pGCPtrSrc   Pointer to the source buffer (GC, incremented appropriately).
    403  * @param   pcTransfer  Pointer to the number of transfer units to write, on return remaining transfer units.
    404  * @param   cb          Size of the transfer unit (1, 2 or 4 bytes).
    405  */
    406 IOMDECL(int) IOMIOPortWriteString(PVM pVM, RTIOPORT Port, PRTGCPTR pGCPtrSrc, PRTGCUINTREG pcTransfers, unsigned cb);
    407 
    408 /**
    409  * [REP*] INSB/INSW/INSD
    410  * ES:EDI,DX[,ECX]
    411  *
    412  * @returns Strict VBox status code. Informational status codes other than the one documented
    413  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    414  * @retval  VINF_SUCCESS                Success.
    415  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    416  *                                      status code must be passed on to EM.
    417  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
    418  * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM.
    419  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    420  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    421  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    422  *
    423  * @param   pVM         The virtual machine (GC pointer ofcourse).
    424  * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
    425  * @param   pCpu        Disassembler CPU state.
    426  */
    427 IOMDECL(int) IOMInterpretINS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
    428 
    429 /**
    430  * [REP*] INSB/INSW/INSD
    431  * ES:EDI,DX[,ECX]
    432  *
    433  * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess)
    434  *
    435  * @returns Strict VBox status code. Informational status codes other than the one documented
    436  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    437  * @retval  VINF_SUCCESS                Success.
    438  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    439  *                                      status code must be passed on to EM.
    440  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
    441  * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM.
    442  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    443  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    444  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    445  *
    446  * @param   pVM             The virtual machine (GC pointer ofcourse).
    447  * @param   pRegFrame       Pointer to CPUMCTXCORE guest registers structure.
    448  * @param   uPort           IO Port
    449  * @param   uPrefix         IO instruction prefix
    450  * @param   cbTransfer      Size of transfer unit
    451  */
    452 IOMDECL(int) IOMInterpretINSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer);
    453 
    454 /**
    455  * [REP*] OUTSB/OUTSW/OUTSD
    456  * DS:ESI,DX[,ECX]
    457  *
    458  * @returns Strict VBox status code. Informational status codes other than the one documented
    459  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    460  * @retval  VINF_SUCCESS                Success.
    461  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    462  *                                      status code must be passed on to EM.
    463  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
    464  * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the write to the REM.
    465  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    466  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    467  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    468  *
    469  * @param   pVM         The virtual machine (GC pointer ofcourse).
    470  * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
    471  * @param   pCpu        Disassembler CPU state.
    472  */
    473 IOMDECL(int) IOMInterpretOUTS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
    474 
    475 /**
    476  * [REP*] OUTSB/OUTSW/OUTSD
    477  * DS:ESI,DX[,ECX]
    478  *
    479  * @remark  Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess)
    480  *
    481  * @returns Strict VBox status code. Informational status codes other than the one documented
    482  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    483  * @retval  VINF_SUCCESS                Success.
    484  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    485  *                                      status code must be passed on to EM.
    486  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
    487  * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the write to the REM.
    488  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    489  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    490  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    491  *
    492  * @param   pVM             The virtual machine (GC pointer ofcourse).
    493  * @param   pRegFrame       Pointer to CPUMCTXCORE guest registers structure.
    494  * @param   uPort           IO Port
    495  * @param   uPrefix         IO instruction prefix
    496  * @param   cbTransfer      Size of transfer unit
    497  */
    498 IOMDECL(int) IOMInterpretOUTSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer);
    499 
    500 /**
    501  * Flushes the IOM port & statistics lookup cache
    502  *
    503  * @param   pVM     The VM.
    504  */
     214IOMDECL(int)  IOMIOPortRead(PVM pVM, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue);
     215IOMDECL(int)  IOMIOPortWrite(PVM pVM, RTIOPORT Port, uint32_t u32Value, size_t cbValue);
     216IOMDECL(int)  IOMInterpretOUT(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
     217IOMDECL(int)  IOMInterpretIN(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
     218IOMDECL(int)  IOMIOPortReadString(PVM pVM, RTIOPORT Port, PRTGCPTR pGCPtrDst, PRTGCUINTREG pcTransfers, unsigned cb);
     219IOMDECL(int)  IOMIOPortWriteString(PVM pVM, RTIOPORT Port, PRTGCPTR pGCPtrSrc, PRTGCUINTREG pcTransfers, unsigned cb);
     220IOMDECL(int)  IOMInterpretINS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
     221IOMDECL(int)  IOMInterpretINSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer);
     222IOMDECL(int)  IOMInterpretOUTS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
     223IOMDECL(int)  IOMInterpretOUTSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer);
    505224IOMDECL(void) IOMFlushCache(PVM pVM);
    506 
    507 /**
    508  * Reads a MMIO register.
    509  *
    510  * @returns VBox status code.
    511  *
    512  * @param   pVM         VM handle.
    513  * @param   GCPhys      The physical address to read.
    514  * @param   pu32Value   Where to store the value read.
    515  * @param   cbValue     The size of the register to read in bytes. 1, 2 or 4 bytes.
    516  */
    517 IOMDECL(int) IOMMMIORead(PVM pVM, RTGCPHYS GCPhys, uint32_t *pu32Value, size_t cbValue);
    518 
    519 /**
    520  * Writes to a MMIO register.
    521  *
    522  * @returns VBox status code.
    523  *
    524  * @param   pVM         VM handle.
    525  * @param   GCPhys      The physical address to write to.
    526  * @param   u32Value    The value to write.
    527  * @param   cbValue     The size of the register to read in bytes. 1, 2 or 4 bytes.
    528  */
    529 IOMDECL(int) IOMMMIOWrite(PVM pVM, RTGCPHYS GCPhys, uint32_t u32Value, size_t cbValue);
    530 
    531 
    532 /**
    533  * Checks that the operation is allowed according to the IOPL
    534  * level and I/O bitmap.
    535  *
    536  * @returns Strict VBox status code. Informational status codes other than the one documented
    537  *          here are to be treated as internal failure.
    538  * @retval  VINF_SUCCESS                Success.
    539  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    540  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    541  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    542  *
    543  * @param   pVM         VM handle.
    544  * @param   pCtxCore    Pointer to register frame.
    545  * @param   Port        The I/O port number.
    546  * @param   cb          The access size.
    547  */
    548 IOMDECL(int) IOMInterpretCheckPortIOAccess(PVM pVM, PCPUMCTXCORE pCtxCore, RTIOPORT Port, unsigned cb);
     225IOMDECL(int)  IOMMMIORead(PVM pVM, RTGCPHYS GCPhys, uint32_t *pu32Value, size_t cbValue);
     226IOMDECL(int)  IOMMMIOWrite(PVM pVM, RTGCPHYS GCPhys, uint32_t u32Value, size_t cbValue);
     227IOMDECL(int)  IOMInterpretCheckPortIOAccess(PVM pVM, PCPUMCTXCORE pCtxCore, RTIOPORT Port, unsigned cb);
    549228
    550229
     
    554233 * @{
    555234 */
    556 
    557 /**
    558  * Attempts to service an IN/OUT instruction.
    559  *
    560  * The \#GP trap handler in GC will call this function if the opcode causing the
    561  * trap is a in or out type instruction. (Call it indirectly via EM that is.)
    562  *
    563  * @returns Strict VBox status code. Informational status codes other than the one documented
    564  *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
    565  * @retval  VINF_SUCCESS                Success.
    566  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the
    567  *                                      status code must be passed on to EM.
    568  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
    569  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
    570  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
    571  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
    572  *
    573  * @param   pVM         The virtual machine (GC pointer ofcourse).
    574  * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
    575  * @param   pCpu        Disassembler CPU state.
    576  */
    577235IOMGCDECL(int) IOMGCIOPortHandler(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);
    578 
    579236/** @} */
    580 #endif
     237#endif /* IN_GC */
    581238
    582239
     
    587244 * @{
    588245 */
    589 
    590 /**
    591  * Initializes the IOM.
    592  *
    593  * @returns VBox status code.
    594  * @param   pVM         The VM to operate on.
    595  */
    596 IOMR3DECL(int) IOMR3Init(PVM pVM);
    597 
    598 /**
    599  * The VM is being reset.
    600  *
    601  * @param   pVM     VM handle.
    602  */
     246IOMR3DECL(int)  IOMR3Init(PVM pVM);
    603247IOMR3DECL(void) IOMR3Reset(PVM pVM);
    604 
    605 /**
    606  * Applies relocations to data and code managed by this
    607  * component. This function will be called at init and
    608  * whenever the VMM need to relocate it self inside the GC.
    609  *
    610  * The IOM will update the addresses used by the switcher.
    611  *
    612  * @param   pVM     The VM.
    613  * @param   offDelta    Relocation delta relative to old location.
    614  */
    615248IOMR3DECL(void) IOMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
    616 
    617 /**
    618  * Terminates the IOM.
    619  *
    620  * Termination means cleaning up and freeing all resources,
    621  * the VM it self is at this point powered off or suspended.
    622  *
    623  * @returns VBox status code.
    624  * @param   pVM         The VM to operate on.
    625  */
    626 IOMR3DECL(int) IOMR3Term(PVM pVM);
    627 
    628 /**
    629  * Registers a I/O port R3 handler.
    630  *
    631  * This API is called by PDM on behalf of a device. Devices must first register
    632  * ring-3 ranges before any GC and R0 ranges can be registered using IOMIOPortRegisterGC()
    633  * and IOMIOPortRegisterR0().
    634  *
    635  * @returns VBox status code.
    636  *
    637  * @param   pVM                 VM handle.
    638  * @param   pDevIns             PDM device instance owning the port range.
    639  * @param   PortStart           First port number in the range.
    640  * @param   cPorts              Number of ports to register.
    641  * @param   pvUser              User argument for the callbacks.
    642  * @param   pfnOutCallback      Pointer to function which is gonna handle OUT operations in R3.
    643  * @param   pfnInCallback       Pointer to function which is gonna handle IN operations in R3.
    644  * @param   pfnOutStringCallback Pointer to function which is gonna handle string OUT operations in R3.
    645  * @param   pfnInStringCallback Pointer to function which is gonna handle string IN operations in R3.
    646  * @param   pszDesc             Pointer to description string. This must not be freed.
    647  */
    648 IOMR3DECL(int) IOMR3IOPortRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTHCPTR pvUser,
    649                                      R3PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R3PTRTYPE(PFNIOMIOPORTIN) pfnInCallback,
    650                                      R3PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStringCallback, R3PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStringCallback,
    651                                      const char *pszDesc);
    652 
    653 /**
    654  * Registers a Memory Mapped I/O R3 handler.
    655  *
    656  * This API is called by PDM on behalf of a device. Devices must register ring-3 ranges
    657  * before any GC and R0 ranges can be registered using IOMMMIORegisterGC() and IOMMMIORegisterR0().
    658  *
    659  * @returns VBox status code.
    660  *
    661  * @param   pVM                 VM handle.
    662  * @param   pDevIns             PDM device instance owning the MMIO range.
    663  * @param   GCPhysStart         First physical address in the range.
    664  * @param   cbRange             The size of the range (in bytes).
    665  * @param   pvUser              User argument for the callbacks.
    666  * @param   pfnWriteCallback    Pointer to function which is gonna handle Write operations.
    667  * @param   pfnReadCallback     Pointer to function which is gonna handle Read operations.
    668  * @param   pfnFillCallback     Pointer to function which is gonna handle Fill/memset operations.
    669  * @param   pszDesc             Pointer to description string. This must not be freed.
    670  */
     249IOMR3DECL(int)  IOMR3Term(PVM pVM);
     250IOMR3DECL(int)  IOMR3IOPortRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTHCPTR pvUser,
     251                                      R3PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R3PTRTYPE(PFNIOMIOPORTIN) pfnInCallback,
     252                                      R3PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStringCallback, R3PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStringCallback,
     253                                      const char *pszDesc);
    671254IOMR3DECL(int)  IOMR3MMIORegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser,
    672255                                    R3PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, R3PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback,
    673256                                    R3PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc);
    674 
    675 
    676 
    677 /**
    678  * Deregisters a I/O Port range.
    679  *
    680  * The specified range must be registered using IOMR3IOPortRegister previous to
    681  * this call. The range does can be a smaller part of the range specified to
    682  * IOMR3IOPortRegister, but it can never be larger.
    683  *
    684  * This function will remove GC, R0 and R3 context port handlers for this range.
    685  *
    686  * @returns VBox status code.
    687  *
    688  * @param   pVM                 The virtual machine.
    689  * @param   pDevIns             The device instance associated with the range.
    690  * @param   PortStart           First port number in the range.
    691  * @param   cPorts              Number of ports to remove starting at PortStart.
    692  */
    693257IOMR3DECL(int)  IOMR3IOPortDeregister(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts);
    694 
    695 
    696 /**
    697  * Deregisters a Memory Mapped I/O handler range.
    698  *
    699  * Registered GC, R0, and R3 ranges are affected.
    700  *
    701  * @returns VBox status code.
    702  *
    703  * @param   pVM                 The virtual machine.
    704  * @param   pDevIns             Device instance which the MMIO region is registered.
    705  * @param   GCPhysStart         First physical address (GC) in the range.
    706  * @param   cbRange             Number of bytes to deregister.
    707  *
    708  *
    709  * @remark  This function mainly for PCI PnP Config and will not do
    710  *          all the checks you might expect it to do.
    711  */
    712258IOMR3DECL(int)  IOMR3MMIODeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange);
    713 
    714 
    715259/** @} */
     260#endif /* IN_RING3 */
     261
     262
     263/** @} */
     264
     265__END_DECLS
     266
    716267#endif
    717268
    718 
    719 /** @} */
    720 
    721 __END_DECLS
    722 
    723 #endif
    724 
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