mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-29 22:40:25 +00:00
7d932dfdc5
Allow the intercept the RTC IRQ for the HPET legacy mode. Then push routing to IRQ8 completely into the HPET. This allows to turn hpet_in_legacy_mode() into a private function. Furthermore, this stops the RTC from clearing IRQ8 even if the HPET is in control. This patch comes with a side effect: The RTC timers will no longer be stoppend when there is no IRQ consumer, possibly causing a minor performance degration. But as the guest may want to redirect the RTC to the SCI in that mode, it should normally disable unused IRQ source anyway. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 lines
287 B
C
13 lines
287 B
C
#ifndef MC146818RTC_H
|
|
#define MC146818RTC_H
|
|
|
|
#include "isa.h"
|
|
|
|
#define RTC_ISA_IRQ 8
|
|
|
|
ISADevice *rtc_init(int base_year, qemu_irq intercept_irq);
|
|
void rtc_set_memory(ISADevice *dev, int addr, int val);
|
|
void rtc_set_date(ISADevice *dev, const struct tm *tm);
|
|
|
|
#endif /* !MC146818RTC_H */
|