VirtualBox

Changeset 56413 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jun 14, 2015 3:43:56 AM (10 years ago)
Author:
vboxsync
Message:

IOM,DevATA,Dev*SCSI: Redid the string I/O callbacks so the devices doesn't need to talk to PGM. (scsi bits are untested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/IOM.cpp

    r56287 r56413  
    132132static DECLCALLBACK(void) iomR3IOPortInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    133133static DECLCALLBACK(void) iomR3MMIOInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    134 static DECLCALLBACK(int) iomR3IOPortDummyIn(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb);
    135 static DECLCALLBACK(int) iomR3IOPortDummyOut(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
    136 static DECLCALLBACK(int) iomR3IOPortDummyInStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrDst, PRTGCUINTREG pcTransfer, unsigned cb);
    137 static DECLCALLBACK(int) iomR3IOPortDummyOutStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrSrc, PRTGCUINTREG pcTransfer, unsigned cb);
     134static FNIOMIOPORTIN        iomR3IOPortDummyIn;
     135static FNIOMIOPORTOUT       iomR3IOPortDummyOut;
     136static FNIOMIOPORTINSTRING  iomR3IOPortDummyInStr;
     137static FNIOMIOPORTOUTSTRING iomR3IOPortDummyOutStr;
    138138
    139139#ifdef VBOX_WITH_STATISTICS
     
    12011201
    12021202/**
    1203  * Dummy Port I/O Handler for string IN operations.
    1204  *
    1205  * @returns VBox status code.
    1206  *
    1207  * @param   pDevIns     The device instance.
    1208  * @param   pvUser      User argument.
    1209  * @param   Port        Port number used for the string IN operation.
    1210  * @param   pGCPtrDst   Pointer to the destination buffer (GC, incremented appropriately).
    1211  * @param   pcTransfer  Pointer to the number of transfer units to read, on return remaining transfer units.
    1212  * @param   cb          Size of the transfer unit (1, 2 or 4 bytes).
    1213  */
    1214 static DECLCALLBACK(int) iomR3IOPortDummyInStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrDst,
    1215                                                PRTGCUINTREG pcTransfer, unsigned cb)
    1216 {
    1217     NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(pGCPtrDst); NOREF(pcTransfer); NOREF(cb);
     1203 * @callback_method_impl{FNIOMIOPORTINSTRING,
     1204 *      Dummy Port I/O Handler for string IN operations.}
     1205 */
     1206static DECLCALLBACK(int) iomR3IOPortDummyInStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint8_t *pbDst,
     1207                                               uint32_t *pcTransfer, unsigned cb)
     1208{
     1209    NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(pbDst); NOREF(pcTransfer); NOREF(cb);
    12181210    return VINF_SUCCESS;
    12191211}
     
    12391231
    12401232/**
    1241  * Dummy Port I/O Handler for string OUT operations.
    1242  *
    1243  * @returns VBox status code.
    1244  *
    1245  * @param   pDevIns     The device instance.
    1246  * @param   pvUser      User argument.
    1247  * @param   Port        Port number used for the string OUT operation.
    1248  * @param   pGCPtrSrc   Pointer to the source buffer (GC, incremented appropriately).
    1249  * @param   pcTransfer  Pointer to the number of transfer units to write, on return remaining transfer units.
    1250  * @param   cb          Size of the transfer unit (1, 2 or 4 bytes).
    1251  */
    1252 static DECLCALLBACK(int) iomR3IOPortDummyOutStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrSrc,
    1253                                                 PRTGCUINTREG pcTransfer, unsigned cb)
    1254 {
    1255     NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(pGCPtrSrc); NOREF(pcTransfer); NOREF(cb);
     1233 * @callback_method_impl{FNIOMIOPORTOUTSTRING,
     1234 *      Dummy Port I/O Handler for string OUT operations.}
     1235 */
     1236static DECLCALLBACK(int) iomR3IOPortDummyOutStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint8_t const *pbSrc,
     1237                                                uint32_t *pcTransfer, unsigned cb)
     1238{
     1239    NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(pbSrc); NOREF(pcTransfer); NOREF(cb);
    12561240    return VINF_SUCCESS;
    12571241}
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