2 small bugs: - comparing bcd with binary data - comparing min with mon Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com> diff -r 65318c8e7694 -r b756fa5fcc64 xen/arch/x86/hvm/rtc.c --- a/xen/arch/x86/hvm/rtc.c Sun Nov 26 18:18:34 2006 +0800 +++ b/xen/arch/x86/hvm/rtc.c Sun Nov 26 19:24:25 2006 +0800 @@ -278,12 +278,15 @@ static void rtc_update_second2(void *opa /* check alarm */ if ( s->cmos_data[RTC_REG_B] & RTC_AIE ) { - if ( ((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 || - s->cmos_data[RTC_SECONDS_ALARM] == s->current_tm.tm_sec) && - ((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 || - s->cmos_data[RTC_MINUTES_ALARM] == s->current_tm.tm_mon) && - ((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 || - s->cmos_data[RTC_HOURS_ALARM] == s->current_tm.tm_hour) ) + if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 + || from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) =+ s->current_tm.tm_sec) + && ((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 + || from_bcd(s, s->cmos_data[RTC_MINUTES_ALARM]) =+ s->current_tm.tm_min) + && ((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 + || from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) =+ s->current_tm.tm_hour)) { s->cmos_data[RTC_REG_C] |= 0xa0; hvm_isa_irq_deassert(s->pt.vcpu->domain, s->irq); Thanks, Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel