Revision eea86673 hw/mc146818rtc.c
b/hw/mc146818rtc.c | ||
---|---|---|
425 | 425 |
} |
426 | 426 |
|
427 | 427 |
/* check alarm */ |
428 |
if (s->cmos_data[RTC_REG_B] & REG_B_AIE) {
|
|
429 |
if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 ||
|
|
430 |
rtc_from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) == s->current_tm.tm_sec) &&
|
|
431 |
((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 ||
|
|
432 |
rtc_from_bcd(s, s->cmos_data[RTC_MINUTES_ALARM]) == s->current_tm.tm_min) &&
|
|
433 |
((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||
|
|
434 |
rtc_from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) == s->current_tm.tm_hour)) { |
|
435 |
|
|
436 |
s->cmos_data[RTC_REG_C] |= 0xa0;
|
|
428 |
if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 ||
|
|
429 |
rtc_from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) == s->current_tm.tm_sec) &&
|
|
430 |
((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 ||
|
|
431 |
rtc_from_bcd(s, s->cmos_data[RTC_MINUTES_ALARM]) == s->current_tm.tm_min) &&
|
|
432 |
((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||
|
|
433 |
rtc_from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) == s->current_tm.tm_hour)) {
|
|
434 |
|
|
435 |
s->cmos_data[RTC_REG_C] |= REG_C_AF; |
|
436 |
if (s->cmos_data[RTC_REG_B] & REG_B_AIE) {
|
|
437 | 437 |
qemu_irq_raise(s->irq); |
438 |
s->cmos_data[RTC_REG_C] |= REG_C_IRQF; |
|
438 | 439 |
} |
439 | 440 |
} |
440 | 441 |
|
Also available in: Unified diff