VirtualBox

Changeset 89848 in vbox


Ignore:
Timestamp:
Jun 23, 2021 8:59:21 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145305
Message:

DevHda: Don't use tab in logging. Added todos about missing locking in hdaMmioWrite. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

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

    r89844 r89848  
    29682968                 */
    29692969                rc = g_aHdaRegMap[idxRegDsc].pfnRead(pDevIns, pThis, idxRegDsc, (uint32_t *)pv);
    2970                 Log3Func(("\tRead %s => %x (%Rrc)\n", g_aHdaRegMap[idxRegDsc].abbrev, *(uint32_t *)pv, VBOXSTRICTRC_VAL(rc)));
     2970                Log3Func(("  Read %s => %x (%Rrc)\n", g_aHdaRegMap[idxRegDsc].abbrev, *(uint32_t *)pv, VBOXSTRICTRC_VAL(rc)));
    29712971                STAM_COUNTER_INC(&pThis->aStatRegReads[idxRegDsc]);
    29722972            }
     
    29952995
    29962996                    rc = g_aHdaRegMap[idxRegDsc].pfnRead(pDevIns, pThis, idxRegDsc, &u32Tmp);
    2997                     Log4Func(("\tRead %s[%db] => %x (%Rrc)*\n", g_aHdaRegMap[idxRegDsc].abbrev, cbReg, u32Tmp, VBOXSTRICTRC_VAL(rc)));
     2997                    Log4Func(("  Read %s[%db] => %x (%Rrc)*\n", g_aHdaRegMap[idxRegDsc].abbrev, cbReg, u32Tmp, VBOXSTRICTRC_VAL(rc)));
    29982998                    STAM_COUNTER_INC(&pThis->aStatRegReads[idxRegDsc]);
    29992999#ifdef IN_RING3
     
    30193019        {
    30203020            LogRel(("HDA: Invalid read access @0x%x (bytes=%u)\n", (uint32_t)off, cb));
    3021             Log3Func(("\tHole at %x is accessed for read\n", offRegLog));
     3021            Log3Func(("  Hole at %x is accessed for read\n", offRegLog));
    30223022            STAM_COUNTER_INC(&pThis->StatRegUnknownReads);
    30233023            rc = VINF_IOM_MMIO_UNUSED_FF;
     
    30313031#ifdef LOG_ENABLED
    30323032        if (cbLog == 4)
    3033             Log3Func(("\tReturning @%#05x -> %#010x %Rrc\n", offRegLog, *(uint32_t *)pv, VBOXSTRICTRC_VAL(rc)));
     3033            Log3Func(("  Returning @%#05x -> %#010x %Rrc\n", offRegLog, *(uint32_t *)pv, VBOXSTRICTRC_VAL(rc)));
    30343034        else if (cbLog == 2)
    3035             Log3Func(("\tReturning @%#05x -> %#06x %Rrc\n", offRegLog, *(uint16_t *)pv, VBOXSTRICTRC_VAL(rc)));
     3035            Log3Func(("  Returning @%#05x -> %#06x %Rrc\n", offRegLog, *(uint16_t *)pv, VBOXSTRICTRC_VAL(rc)));
    30363036        else if (cbLog == 1)
    3037             Log3Func(("\tReturning @%#05x -> %#04x %Rrc\n", offRegLog, *(uint8_t *)pv, VBOXSTRICTRC_VAL(rc)));
     3037            Log3Func(("  Returning @%#05x -> %#04x %Rrc\n", offRegLog, *(uint8_t *)pv, VBOXSTRICTRC_VAL(rc)));
    30383038#endif
    30393039    }
     
    31643164        Log3Func(("@%#05x u%u=%#0*RX64 %s\n", (uint32_t)off, cb * 8, 2 + cb * 2, u64Value, g_aHdaRegMap[idxRegDsc].abbrev));
    31653165        rc = hdaWriteReg(pDevIns, pThis, idxRegDsc, u64Value, "");
    3166         Log3Func(("\t%#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX));
     3166        Log3Func(("  %#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX));
    31673167    }
    31683168    /*
     
    31723172             && cb < g_aHdaRegMap[idxRegDsc].size)
    31733173    {
     3174        /** @todo r=bird: This is not correctly serialized!  Also we're not gaining
     3175         *        any advantage by not entering the critsect here already, because
     3176         *        hdaWriteReg will enter it! */
    31743177        u64Value |=   pThis->au32Regs[g_aHdaRegMap[idxRegDsc].mem_idx]
    31753178                    & g_afMasks[g_aHdaRegMap[idxRegDsc].size]
    31763179                    & ~g_afMasks[cb];
    31773180        Log4Func(("@%#05x u%u=%#0*RX64 cb=%#x cbReg=%x %s\n"
    3178                   "\tSupplying missing bits (%#x): %#llx -> %#llx ...\n",
     3181                  "hdaMmioWrite: Supplying missing bits (%#x): %#llx -> %#llx ...\n",
    31793182                  (uint32_t)off, cb * 8, 2 + cb * 2, u64Value, cb, g_aHdaRegMap[idxRegDsc].size, g_aHdaRegMap[idxRegDsc].abbrev,
    31803183                  g_afMasks[g_aHdaRegMap[idxRegDsc].size] & ~g_afMasks[cb], u64Value & g_afMasks[cb], u64Value));
    31813184        rc = hdaWriteReg(pDevIns, pThis, idxRegDsc, u64Value, "");
    3182         Log4Func(("\t%#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX));
     3185        Log4Func(("  %#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX));
    31833186        STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatRegSubWrite));
    31843187    }
     
    31893192    {
    31903193#ifdef IN_RING3
     3194        /** @todo r=bird: This is not correctly serialized!  Also we're not gaining
     3195         *        much of an advantage by not entering the critsect here already,
     3196         *        becuase hdaWriteReg will eventually enter it, possibly multiple
     3197         *        times!   The only would be unknown wrights, which should be rare
     3198         *        and not something we need to optimize for. */
    31913199        if (idxRegDsc == -1)
    31923200            Log4Func(("@%#05x u32=%#010x cb=%d\n", (uint32_t)off, *(uint32_t const *)pv, cb));
     
    32143222                u64Value <<= cbBefore * 8;
    32153223                u64Value  |= pThis->au32Regs[idxRegMem] & g_afMasks[cbBefore];
    3216                 Log4Func(("\tWithin register, supplied %u leading bits: %#llx -> %#llx ...\n",
     3224                Log4Func(("  Within register, supplied %u leading bits: %#llx -> %#llx ...\n",
    32173225                          cbBefore * 8, ~(uint64_t)g_afMasks[cbBefore] & u64Value, u64Value));
    32183226                STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatRegMultiWrites));
     
    32393247                {
    32403248                    u64Value |= pThis->au32Regs[idxRegMem] & g_afMasks[cbReg] & ~g_afMasks[cb];
    3241                     Log4Func(("\tSupplying missing bits (%#x): %#llx -> %#llx ...\n",
     3249                    Log4Func(("  Supplying missing bits (%#x): %#llx -> %#llx ...\n",
    32423250                              g_afMasks[cbReg] & ~g_afMasks[cb], u64Value & g_afMasks[cb], u64Value));
    32433251                }
     
    32463254# endif
    32473255                rc = hdaWriteReg(pDevIns, pThis, idxRegDsc, u64Value & g_afMasks[cbReg], "*");
    3248                 Log4Func(("\t%#x -> %#x\n", uLogOldVal, pThis->au32Regs[idxRegMem]));
     3256                Log4Func(("  %#x -> %#x\n", uLogOldVal, pThis->au32Regs[idxRegMem]));
    32493257            }
    32503258            else
  • trunk/src/VBox/Devices/Audio/DevHdaStream.cpp

    r89847 r89848  
    23532353        pHandler->GCPhysLast  = pHandler->GCPhysFirst + (regionSize - 1);
    23542354
    2355         LogFunc(("\tRegistering region '%s': 0x%x - 0x%x (region size: %zu)\n",
     2355        LogFunc(("  Registering region '%s': %#RGp - %#RGp (region size: %#zx)\n",
    23562356                 szDesc, pHandler->GCPhysFirst, pHandler->GCPhysLast, regionSize));
    2357         LogFunc(("\tBDLE @ 0x%x - 0x%x (%RU32)\n",
     2357        LogFunc(("  BDLE @ %#RGp - %#RGp (%#RX32)\n",
    23582358                 pHandler->BDLEAddr, pHandler->BDLEAddr + pHandler->BDLESize, pHandler->BDLESize));
    23592359
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