VirtualBox

Changeset 84514 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
May 25, 2020 3:58:22 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138243
Message:

Devices/USB: Convert to use new PDMDevHlp guest memory read/write helpers differentiating between metadata/userdata transfers for tracing, bugref:9210

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/DevOHCI.cpp

    r82968 r84514  
    13121312{
    13131313    if (cbBuf)
    1314         PDMDevHlpPhysRead(pDevIns, Addr, pvBuf, cbBuf);
     1314        PDMDevHlpPhysReadUser(pDevIns, Addr, pvBuf, cbBuf);
     1315}
     1316
     1317/**
     1318 * Reads physical memory - metadata.
     1319 */
     1320DECLINLINE(void) ohciR3PhysReadMeta(PPDMDEVINS pDevIns, uint32_t Addr, void *pvBuf, size_t cbBuf)
     1321{
     1322    if (cbBuf)
     1323        PDMDevHlpPhysReadMeta(pDevIns, Addr, pvBuf, cbBuf);
    13151324}
    13161325
     
    13211330{
    13221331    if (cbBuf)
    1323         PDMDevHlpPCIPhysWrite(pDevIns, Addr, pvBuf, cbBuf);
     1332        PDMDevHlpPCIPhysWriteUser(pDevIns, Addr, pvBuf, cbBuf);
     1333}
     1334
     1335/**
     1336 * Writes physical memory - metadata.
     1337 */
     1338DECLINLINE(void) ohciR3PhysWriteMeta(PPDMDEVINS pDevIns, uint32_t Addr, const void *pvBuf, size_t cbBuf)
     1339{
     1340    if (cbBuf)
     1341        PDMDevHlpPCIPhysWriteMeta(pDevIns, Addr, pvBuf, cbBuf);
    13241342}
    13251343
     
    13291347DECLINLINE(void) ohciR3GetDWords(PPDMDEVINS pDevIns, uint32_t Addr, uint32_t *pau32s, int c32s)
    13301348{
    1331     ohciR3PhysRead(pDevIns, Addr, pau32s, c32s * sizeof(uint32_t));
     1349    ohciR3PhysReadMeta(pDevIns, Addr, pau32s, c32s * sizeof(uint32_t));
    13321350# ifndef RT_LITTLE_ENDIAN
    13331351    for(int i = 0; i < c32s; i++)
     
    13421360{
    13431361# ifdef RT_LITTLE_ENDIAN
    1344     ohciR3PhysWrite(pDevIns, Addr, pau32s, cu32s << 2);
     1362    ohciR3PhysWriteMeta(pDevIns, Addr, pau32s, cu32s << 2);
    13451363# else
    13461364    for (int i = 0; i < c32s; i++, pau32s++, Addr += sizeof(*pau32s))
    13471365    {
    13481366        uint32_t u32Tmp = RT_H2LE_U32(*pau32s);
    1349         ohciR3PhysWrite(pDevIns, Addr, (uint8_t *)&u32Tmp, sizeof(u32Tmp));
     1367        ohciR3PhysWriteMeta(pDevIns, Addr, (uint8_t *)&u32Tmp, sizeof(u32Tmp));
    13501368    }
    13511369# endif
     
    40404058
    40414059    Log3(("ohci: Updating HCCA on frame %#x\n", pThis->HcFmNumber));
    4042     ohciR3PhysWrite(pDevIns, pThis->hcca + OHCI_HCCA_OFS, (uint8_t *)&hcca, sizeof(hcca));
     4060    ohciR3PhysWriteMeta(pDevIns, pThis->hcca + OHCI_HCCA_OFS, (uint8_t *)&hcca, sizeof(hcca));
    40434061    if (fWriteDoneHeadInterrupt)
    40444062        ohciR3SetInterrupt(pDevIns, pThis, OHCI_INTR_WRITE_DONE_HEAD);
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