From: she roy <she.min.roy@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Fwd: trigger a gpio interrupt inside qemu
Date: Wed, 28 Aug 2013 16:01:26 +0800 [thread overview]
Message-ID: <CAMY-hrHqLwZxQefP1Z1vRnhw1JFAzKNk+bnzosmpribAc6n4bw@mail.gmail.com> (raw)
In-Reply-To: <CAMY-hrGm7QUMq0mf2_Y-YvgPa6302zrsCa8YWui3aJo2mFHsPQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]
---------- Forwarded message ----------
From: she roy <she.min.roy@gmail.com>
Date: 2013/8/28
Subject: Re: [Qemu-devel] trigger a gpio interrupt inside qemu
To: Max Filippov <jcmvbkbc@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 <jcmvbkbc@gmail.com>
> On Tue, Aug 27, 2013 at 3:55 PM, she roy <she.min.roy@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 <jcmvbkbc@gmail.com>
> >>
> >> On Tue, Aug 27, 2013 at 3:36 PM, she roy <she.min.roy@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
>
[-- Attachment #2: Type: text/html, Size: 3680 bytes --]
next prev parent reply other threads:[~2013-08-28 8:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 11:36 [Qemu-devel] trigger a gpio interrupt inside qemu she roy
2013-08-27 11:52 ` Max Filippov
[not found] ` <CAMY-hrGSwRw1oq58Pz66sfmDb4SA-bZfBSiU6kmfkj6FBPK97A@mail.gmail.com>
[not found] ` <CAMo8BfLxbM09rGoz3i=MqxM=+12B4aJLUMXZEOiJ-0yu8WaqWA@mail.gmail.com>
[not found] ` <CAMY-hrGm7QUMq0mf2_Y-YvgPa6302zrsCa8YWui3aJo2mFHsPQ@mail.gmail.com>
2013-08-28 8:01 ` she roy [this message]
2013-08-28 8:15 ` [Qemu-devel] Fwd: " Max Filippov
2013-08-28 8:19 ` she roy
2013-08-28 8:27 ` Max Filippov
2013-08-28 8:35 ` Max Filippov
2013-08-28 9:33 ` she roy
2013-08-28 11:00 ` Peter Maydell
2013-08-28 8:19 ` Peter Maydell
2013-08-28 8:26 ` she roy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMY-hrHqLwZxQefP1Z1vRnhw1JFAzKNk+bnzosmpribAc6n4bw@mail.gmail.com \
--to=she.min.roy@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).