On 04/14/2017 01:09 PM, Paolo Bonzini wrote:
On 13/04/2017 16:52, Xiao Guangrong wrote:
On 04/13/2017 04:39 PM, Xiao Guangrong wrote:
On 04/13/2017 02:37 PM, Paolo Bonzini wrote:
However, I think that the above should be exactly how the RTC should
work. The original RTC circuit had 22 divider stages (see page 13 of
the datasheet[1], at the bottom right), and the periodic interrupt taps
the rising edge of one of the dividers (page 16, second paragraph). The
datasheet also never mentions a comparator being used to trigger the
periodic interrupts.
That was my thought before, however, after more test, i am not sure if
re-configuring RegA changes these divider stages internal...
It's unlikely because there is a separate divider reset command. But
Hailiang found the same problem, and Bochs does the same implementation
as you.
Happy to see the same approach is being used in Bochs. Thanks for your
check. :)