VirtualBox

Ignore:
Timestamp:
Aug 25, 2013 8:05:45 PM (11 years ago)
Author:
vboxsync
Message:

DevDMA: Do not write memory on verify transfers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevDMA.cpp

    r46499 r48046  
    180180};
    181181
     182/* DMA transfer types. */
     183enum {
     184    DTYPE_VERIFY,   /* Verify transfer type. */
     185    DTYPE_WRITE,    /* Write transfer type. */
     186    DTYPE_READ,     /* Read transfer type. */
     187    DTYPE_ILLEGAL   /* Undefined. */
     188};
     189
    182190/* Convert DMA channel number (0-7) to controller number (0-1). */
    183191#define DMACH2C(c)      (c < 4 ? 0 : 1)
     
    197205/* Test the auto-init bit of mode register. */
    198206#define IS_MODE_AI(c)   ((c) & 0x10)
     207/* Extract the transfer type bits of mode register. */
     208#define GET_MODE_XTYP(c)(((c) & 0x0c) >> 2)
    199209
    200210/* Perform a master clear (reset) on a DMA controller. */
     
    702712
    703713    LogFlow(("dmaWriteMemory: pThis=%p uChannel=%u pvBuffer=%p off=%u cbBlock=%u\n", pThis, uChannel, pvBuffer, off, cbBlock));
     714    if (GET_MODE_XTYP(ch->u8Mode) == DTYPE_VERIFY)
     715    {
     716        Log(("DMA verify transfer, ignoring write.\n"));
     717        return cbBlock;
     718    }
     719
    704720    PDMCritSectEnter(pDevIns->pCritSectRoR3, VERR_IGNORED);
    705721
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