VirtualBox

Changeset 51528 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 4, 2014 11:41:38 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94162
Message:

HDA: Do not crash when logging split register access.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r51516 r51528  
    24312431    uint32_t    offReg = GCPhysAddr - pThis->MMIOBaseAddr;
    24322432    int         idxRegDsc = hdaRegLookup(pThis, offReg);
    2433     uint32_t    idxRegMem = g_aHdaRegMap[idxRegDsc].mem_idx;
     2433    uint32_t    idxRegMem = idxRegDsc != -1 ? g_aHdaRegMap[idxRegDsc].mem_idx : UINT32_MAX;
    24342434    uint64_t    u64Value;
    24352435    if (cb == 4)        u64Value = *(uint32_t const *)pv;
     
    24652465     */
    24662466    if (idxRegDsc != -1 && g_aHdaRegMap[idxRegDsc].size == cb)
     2467    {
    24672468        rc = hdaWriteReg(pThis, idxRegDsc, u64Value, "");
     2469        Log(("hdaMMIOWrite: @%#05x %#x -> %#x\n", offRegLog, u32LogOldValue,
     2470             idxRegLog != -1 ? pThis->au32Regs[idxRegLog] : UINT32_MAX));
     2471    }
    24682472    /*
    24692473     * Partial or multiple register access, loop thru the requested memory.
     
    25012505                         g_afMasks[cbReg] & ~g_afMasks[cb], u64Value & g_afMasks[cb], u64Value));
    25022506                }
     2507                uint32_t u32LogOldVal = pThis->au32Regs[idxRegMem];
    25032508                rc = hdaWriteReg(pThis, idxRegDsc, u64Value, "*");
     2509                Log(("hdaMMIOWrite: @%#05x %#x -> %#x\n", offRegLog, u32LogOldVal,
     2510                     pThis->au32Regs[idxRegMem]));
    25042511            }
    25052512            else
     
    25802587    else
    25812588        rc = VINF_SUCCESS;
    2582 #endif
     2589
    25832590    Log(("hdaMMIOWrite: @%#05x %#x -> %#x\n", offRegLog, u32LogOldValue,
    25842591         idxRegLog != -1 ? pThis->au32Regs[idxRegLog] : UINT32_MAX));
     2592#endif
    25852593    return rc;
    25862594}
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