qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 0/4] RTC: New logic to emulate RTC


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 0/4] RTC: New logic to emulate RTC
Date: Thu, 23 Feb 2012 08:43:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

On 02/23/2012 02:49 AM, Zhang, Yang Z wrote:
>> Currently they hang very early because UF is not set.  I
>> attempted to fix that, but ran into other problems.  UIP seems
>> not to be really in sync with the update interrupt, because the
>> 500 ms update tests pass when testing UIP, but not when testing
>> UF.  (Another reason why I wanted to have the 500 ms rule: it
>> improves reliability of tests!)
> 
> The current logic is not correct: It check the UIP with rtc clock and
> use a timer to set UF bit. Since the delay of the timer, those two do
> not in sync in some cases. Now, I separate UF logic from update
> interrupt. And base it on UIP. With this changed, it works.

I'm not sure I understand, UIP and UF are indeed the same logic (UIP is
1 between the rising and falling edge; UF becomes 1 on the falling
edge), but they are also the same thing as the interrupt.  UIE only says
whether an interrupt is raised on the rising edge of UF.

So, merging the handling of UF and UIP makes sense, but separating the
two from the interrupt seems wrong.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]