qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [RESEND][PATCH] booke timers


From: Scott Wood
Subject: Re: [Qemu-devel] [Qemu-ppc] [RESEND][PATCH] booke timers
Date: Tue, 13 Sep 2011 11:44:16 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

On 09/13/2011 08:08 AM, Alexander Graf wrote:
> Fabien Chouteau wrote:
>> static void booke_update_irq(CPUState *env)
>> {
>>     ppc_set_irq(env, PPC_INTERRUPT_DECR,
>>                 (env->spr[SPR_BOOKE_TSR] & TSR_DIS
>>                  && env->spr[SPR_BOOKE_TCR] & TCR_DIE));
>>
>>     ppc_set_irq(env, PPC_INTERRUPT_WDT,
>>                 (env->spr[SPR_BOOKE_TSR] & TSR_WIS
>>                  && env->spr[SPR_BOOKE_TCR] & TCR_WIE));
>>
>>     ppc_set_irq(env, PPC_INTERRUPT_FIT,
>>                 (env->spr[SPR_BOOKE_TSR] & TSR_FIS
>>                  && env->spr[SPR_BOOKE_TCR] & TCR_FIE));
>> }
>>   
> 
> Awesome! Please also check on MSR.EE and send a new patch then :)

If you check on EE here, then you'll need to call booke_update_irq()
when EE changes (not sure whether that's the plan).  Another option
would be to unset the irq if the condition is not valid.  This would
also be better in that you could have all three set (DIS, DIE, EE) and
not deliver the interrupt because there's a higher priority exception.

-Scott




reply via email to

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