---------- Forwarded message ---------- From: she roy <she.min....@gmail.com> Date: 2013/8/28 Subject: Re: [Qemu-devel] trigger a gpio interrupt inside qemu To: Max Filippov <jcmvb...@gmail.com>
I tested qemu_irq_pulse(gPl061->irq); the guest did not generate an interrupt. so I changed to qemu_set_irq(gPl061->irq, 1); sleep(1); qemu_set_irq(gPl061->irq, 0); A lot of interrupts generated. Is it possible to generate just one interrupt? Thanks. 2013/8/27 Max Filippov <jcmvb...@gmail.com> > On Tue, Aug 27, 2013 at 3:55 PM, she roy <she.min....@gmail.com> wrote: > > How to lower it? Thank you very much! > > > > qemu_set_irq(gPl061->irq, 0); > > Or you could try > > void pl061_raise_irq() > { > qemu_irq_pulse(gPl061->irq); > } > > > 2013/8/27 Max Filippov <jcmvb...@gmail.com> > >> > >> On Tue, Aug 27, 2013 at 3:36 PM, she roy <she.min....@gmail.com> wrote: > >> > Is there somebody can help me to trigger a gpio interrupt inside > qemu? I > >> > wrote a simple function to trigger a interrupt in pl061.c as follow: > >> > PL061State *gPl061; > >> > void pl061_raise_irq() > >> > { > >> > qemu_set_irq(gPl061->irq, 1); > >> > } > >> > >> [...] > >> > >> > But when i call pl061_raise_irq inside qemu once, the guest run into > an > >> > infinite loop. it prints: > >> > ... > >> > irq:[927012]receive the irq at -12002... > >> > irq:[927013]receive the irq at -12002... > >> > irq:[927014]receive the irq at -12002... > >> > irq:[927015]receive the irq at -12002... > >> > irq:[927016]receive the irq at -12002... > >> > irq:[927017]receive the irq at -12002... > >> > irq:[927018]receive the irq at -12002... > >> > ... > >> > can somebody tell me what's wrong? > >> > >> You have raised IRQ in your pl061_raise_irq(), but you haven't lowered > it. > >> > >> -- > >> Thanks. > >> -- Max > > > > > > > > -- > Thanks. > -- Max >