Cc: paolo and mst

On 6/13/21 2:15 PM, Jason Thorpe wrote:
Make the PF flag behave like real hardware by always running the
periodic timer without regard to the setting of the PIE bit, so
that the PF will be set when the period expires even if an interrupt
will not be raised.  This behavior is documented on page 16 of the
MC146818A advance information datasheet.

Signed-off-by: Jason Thorpe <thor...@me.com>
---
  hw/rtc/mc146818rtc.c | 4 ----
  1 file changed, 4 deletions(-)

diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index 4fbafddb22..366b8f13de 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -155,10 +155,6 @@ static uint32_t rtc_periodic_clock_ticks(RTCState *s)
  {
      int period_code;
- if (!(s->cmos_data[RTC_REG_B] & REG_B_PIE)) {
-        return 0;
-     }

This looks correct, but I don't know enough about this device.


r~

Reply via email to