VirtualBox

Changeset 89775 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Jun 18, 2021 9:51:59 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145227
Message:

DevIchAc97: Looked into the 'unimplemented' register accesses (all harmless as far as linux guests are concerned). bugref:9890

File:
1 edited

Legend:

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

    r89773 r89775  
    589589    STAMCOUNTER             StatUnimplementedNabmReads;
    590590    STAMCOUNTER             StatUnimplementedNabmWrites;
     591    STAMCOUNTER             StatUnimplementedNamReads;
     592    STAMCOUNTER             StatUnimplementedNamWrites;
    591593#ifdef VBOX_WITH_STATISTICS
    592594    STAMPROFILE             StatTimer;
     
    25102512                    default:
    25112513                        *pu32 = UINT32_MAX;
    2512                         LogFunc(("U nabm readb %#x -> %#x\n", offPort, UINT32_MAX));
     2514                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort));
    25132515                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
    25142516                        break;
     
    25312533                    default:
    25322534                        *pu32 = UINT32_MAX;
    2533                         LogFunc(("U nabm readw %#x -> %#x\n", offPort, UINT32_MAX));
     2535                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort));
    25342536                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
    25352537                        break;
     
    25642566                    default:
    25652567                        *pu32 = UINT32_MAX;
    2566                         LogFunc(("U nabm readl %#x -> %#x\n", offPort, UINT32_MAX));
     2568                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort));
    25672569                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
    25682570                        break;
     
    25912593                    default:
    25922594                        *pu32 = UINT32_MAX;
    2593                         LogFunc(("U nabm readb %#x -> %#x\n", offPort, UINT32_MAX));
     2595                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort));
    25942596                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
    25952597                        break;
     
    25992601            case 2:
    26002602                *pu32 = UINT32_MAX;
    2601                 LogFunc(("U nabm readw %#x -> %#x\n", offPort, UINT32_MAX));
     2603                LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort));
    26022604                STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
    26032605                break;
     
    26182620                    default:
    26192621                        *pu32 = UINT32_MAX;
    2620                         LogFunc(("U nabm readl %#x -> %#x\n", offPort, UINT32_MAX));
     2622                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort));
    26212623                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
    26222624                        break;
     
    28222824
    28232825                    default:
    2824                         LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 1\n", offPort, u32));
     2826                        /* Linux tries to write CIV. */
     2827                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x%s <- %#x LB 1 (line " RT_XSTR(__LINE__) ")\n",
     2828                                 offPort, (offPort & AC97_NABM_OFF_MASK) == AC97_NABM_OFF_CIV ? " (CIV)" : "" , u32));
    28252829                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
    28262830                        break;
     
    28382842                        break;
    28392843                    default:
    2840                         LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 2\n", offPort, u32));
     2844                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
    28412845                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
    28422846                        break;
     
    28562860                        break;
    28572861                    default:
    2858                         LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 4\n", offPort, u32));
     2862                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
    28592863                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
    28602864                        break;
     
    28722876        {
    28732877            case 1:
    2874                 LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 1\n", offPort, u32));
     2878                LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
    28752879                STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
    28762880                break;
    28772881
    28782882            case 2:
    2879                 LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 2\n", offPort, u32));
     2883                LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
    28802884                STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
    28812885                break;
     
    29052909                        break;
    29062910                    default:
    2907                         LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 4\n", offPort, u32));
     2911                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
    29082912                        STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
    29092913                        break;
     
    33293333    {
    33303334        case 1:
    3331             LogRel2(("AC97: Warning: Unimplemented read (1 byte) offPort=%#x\n", offPort));
     3335            LogRel2(("AC97: Warning: Unimplemented NAM read offPort=%#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort));
     3336            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamReads);
    33323337            pThis->cas = 0;
    33333338            *pu32 = UINT32_MAX;
     
    33403345
    33413346        case 4:
    3342             LogRel2(("AC97: Warning: Unimplemented read (4 bytes) offPort=%#x\n", offPort));
     3347            LogRel2(("AC97: Warning: Unimplemented NAM read offPort=%#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort));
     3348            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamReads);
    33433349            pThis->cas = 0;
    33443350            *pu32 = UINT32_MAX;
     
    33733379    {
    33743380        case 1:
    3375             LogRel2(("AC97: Warning: Unimplemented NAMWrite (1 byte) offPort=%#x <- %#x\n", offPort, u32));
     3381            LogRel2(("AC97: Warning: Unimplemented NAM write offPort=%#x <- %#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
     3382            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamWrites);
    33763383            pThis->cas = 0;
    33773384            break;
     
    35593566                    break;
    35603567                default:
    3561                     LogRel2(("AC97: Warning: Unimplemented NAMWrite (2 bytes) offPort=%#x <- %#x\n", offPort, u32));
     3568                    /* Most of these are to register we don't care about like AC97_CD_Volume_Mute
     3569                       and AC97_Master_Volume_Mono_Mute or things we don't need to handle specially.
     3570                       Thus this is not a 'warning' but an 'info log message. */
     3571                    LogRel2(("AC97: Info: Unimplemented NAM write offPort=%#x <- %#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
     3572                    STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamWrites);
    35623573                    ichac97MixerSet(pThis, offPort, u32);
    35633574                    break;
     
    35673578
    35683579        case 4:
    3569             LogRel2(("AC97: Warning: Unimplemented 4 byte NAMWrite: offPort=%#x <- %#x\n", offPort, u32));
     3580            LogRel2(("AC97: Warning: Unimplemented NAM write offPort=%#x <- %#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
     3581            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamWrites);
    35703582            pThis->cas = 0;
    35713583            break;
    35723584
    35733585        default:
    3574             AssertMsgFailed(("Unhandled NAMWrite offPort=%#x, cb=%u u32=%#x\n", offPort, cb, u32));
     3586            AssertMsgFailed(("Unhandled NAM write offPort=%#x, cb=%u u32=%#x\n", offPort, cb, u32));
    35753587            break;
    35763588    }
     
    45144526    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNabmReads,  STAMTYPE_COUNTER, "UnimplementedNabmReads", STAMUNIT_OCCURENCES, "Unimplemented NABM register reads.");
    45154527    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNabmWrites, STAMTYPE_COUNTER, "UnimplementedNabmWrites", STAMUNIT_OCCURENCES, "Unimplemented NABM register writes.");
     4528    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNamReads,   STAMTYPE_COUNTER, "UnimplementedNamReads", STAMUNIT_OCCURENCES, "Unimplemented NAM register reads.");
     4529    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNamWrites,  STAMTYPE_COUNTER, "UnimplementedNamWrites", STAMUNIT_OCCURENCES, "Unimplemented NAM register writes.");
    45164530# ifdef VBOX_WITH_STATISTICS
    45174531    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTimer,        STAMTYPE_PROFILE, "Timer",        STAMUNIT_TICKS_PER_CALL, "Profiling ichac97Timer.");
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