VirtualBox

Changeset 1384 in vbox


Ignore:
Timestamp:
Mar 9, 2007 7:08:16 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19380
Message:

Fixed RTC alarm (problem seen in Norton Diagnostics). We need to a) compare tm_min instead
of tm_mon(!!), and b) properly convert from BCD if necessary.

File:
1 edited

Legend:

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

    r1245 r1384  
    117117# if !defined(__WIN__)
    118118    uint32_t Alignment1[3];
    119 # endif 
     119# endif
    120120#endif
    121121    int32_t irq;
     
    209209        case RTC_MINUTES_ALARM:
    210210        case RTC_HOURS_ALARM:
    211             /* XXX: not supported */
    212211            s->cmos_data[s->cmos_index] = data;
    213212            break;
     
    402401    if (s->cmos_data[RTC_REG_B] & REG_B_AIE) {
    403402        if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 ||
    404              s->cmos_data[RTC_SECONDS_ALARM] == s->current_tm.tm_sec) &&
     403             from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) == s->current_tm.tm_sec) &&
    405404            ((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 ||
    406              s->cmos_data[RTC_MINUTES_ALARM] == s->current_tm.tm_mon) &&
     405             from_bcd(s, s->cmos_data[RTC_MINUTES_ALARM]) == s->current_tm.tm_min) &&
    407406            ((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||
    408              s->cmos_data[RTC_HOURS_ALARM] == s->current_tm.tm_hour)) {
     407             from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) == s->current_tm.tm_hour)) {
    409408
    410409            s->cmos_data[RTC_REG_C] |= 0xa0;
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