mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-14 15:36:25 +00:00
rtc: raise AF bit when the alarm is encountered but AIE=0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
3b89eb43b6
commit
eea8667360
@ -425,7 +425,6 @@ static void rtc_update_second2(void *opaque)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check alarm */
|
/* check alarm */
|
||||||
if (s->cmos_data[RTC_REG_B] & REG_B_AIE) {
|
|
||||||
if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 ||
|
if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 ||
|
||||||
rtc_from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) == s->current_tm.tm_sec) &&
|
rtc_from_bcd(s, 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] & 0xc0) == 0xc0 ||
|
||||||
@ -433,8 +432,10 @@ static void rtc_update_second2(void *opaque)
|
|||||||
((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||
|
((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||
|
||||||
rtc_from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) == s->current_tm.tm_hour)) {
|
rtc_from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) == s->current_tm.tm_hour)) {
|
||||||
|
|
||||||
s->cmos_data[RTC_REG_C] |= 0xa0;
|
s->cmos_data[RTC_REG_C] |= REG_C_AF;
|
||||||
|
if (s->cmos_data[RTC_REG_B] & REG_B_AIE) {
|
||||||
qemu_irq_raise(s->irq);
|
qemu_irq_raise(s->irq);
|
||||||
|
s->cmos_data[RTC_REG_C] |= REG_C_IRQF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user