VirtualBox

Changeset 2851 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 24, 2007 6:02:23 PM (18 years ago)
Author:
vboxsync
Message:

Log RTC frequency changes.

File:
1 edited

Legend:

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

    r2850 r2851  
    139139    /** The RTC device helpers. */
    140140    HCPTRTYPE(PCPDMRTCHLP) pRtcHlpHC;
     141    /** Number of release log entries. Used to prevent floading. */
     142    uint32_t        cRelLogEntries;
     143    uint32_t        alignment;
    141144};
    142145
     
    166169        TMTimerSet(s->CTXSUFF(pPeriodicTimer), s->next_periodic_time);
    167170
     171        if (s->cRelLogEntries++ < 64)
     172            LogRel(("RTC: period=%#x (%d) %u Hz\n", period, period, _32K / period));
    168173    } else {
    169174        TMTimerStop(s->CTXSUFF(pPeriodicTimer));
     175        if (s->cRelLogEntries++ < 64)
     176            LogRel(("RTC: stopped the periodic timer\n"));
    170177    }
    171178}
     
    476483    qemu_put_timer(f, s->CTXSUFF(pSecondTimer));
    477484    qemu_put_timer(f, s->CTXSUFF(pSecondTimer2));
     485
    478486}
    479487
     
    503511    qemu_get_timer(f, s->CTXSUFF(pSecondTimer));
    504512    qemu_get_timer(f, s->CTXSUFF(pSecondTimer2));
     513
     514    int period_code = s->cmos_data[RTC_REG_A] & 0x0f;
     515    if (    period_code != 0
     516        &&  (s->cmos_data[RTC_REG_B] & REG_B_PIE)) {
     517        if (period_code <= 2)
     518            period_code += 7;
     519        int period = 1 << (period_code - 1);
     520        LogRel(("RTC: period=%#x (%d) %u Hz (restore)\n", period, period, _32K / period));
     521    } else {
     522        LogRel(("RTC: stopped the periodic timer (restore)\n"));
     523    }
     524    s->cRelLogEntries = 0;
    505525    return 0;
    506526}
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