* Re:[Qemu-devel] Interrupt request info
[not found] <200611011205.1gFjwA1qs3Nl3pX2@cave.mail.atl.earthlink.net>
@ 2006-11-01 23:25 ` Roger Lathrop
2006-11-01 23:31 ` [Qemu-devel] " Paul Brook
0 siblings, 1 reply; 6+ messages in thread
From: Roger Lathrop @ 2006-11-01 23:25 UTC (permalink / raw)
To: qemu-devel
Alessandro,
All you should need to do to raise an IRQ in your code is:
pic_set_irq(s->irq,1);
When the irq is serviced (in one of your ioport traps, I would assume),
knock the irq down:
pic_set_irq(s->irq,0);
For debugging, you might want to go into i8259.c and uncomment the #define
DEBUG_IRQ_COUNT line.
You can then use command 'info irq' in the monitor console. This will show
you a count of interrupts for each IRQ.
Regards,
Roger
> For example, I wrote a module of a simple memory without implementing
> IRQ...
> I think it is an error but it works fine... are IRQ raise in any case???
> I look at other code source of implemented hw but for each device there is
> a
> differeny way to raise an interrupt (i see).
> Is there a standard way to do this?
> The following is an excerpt of my simple memory, please can you describe
> me
> fastly how can I manage this?
>
> Thank you
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Interrupt request info
2006-11-01 23:25 ` Re:[Qemu-devel] Interrupt request info Roger Lathrop
@ 2006-11-01 23:31 ` Paul Brook
2006-11-04 16:08 ` Alessandro Corradi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Paul Brook @ 2006-11-01 23:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Roger Lathrop
On Wednesday 01 November 2006 23:25, Roger Lathrop wrote:
> Alessandro,
>
> All you should need to do to raise an IRQ in your code is:
> pic_set_irq(s->irq,1);
>
> When the irq is serviced (in one of your ioport traps, I would assume),
> knock the irq down:
> pic_set_irq(s->irq,0);
No. You should use pic_set_irq_new. Otherwise your code will break on machines
with multiple interrupt controllers.
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Interrupt request info
2006-11-01 23:31 ` [Qemu-devel] " Paul Brook
@ 2006-11-04 16:08 ` Alessandro Corradi
2006-11-06 14:39 ` Fwd: " Alessandro Corradi
2006-11-11 11:32 ` Alessandro Corradi
2006-11-12 15:46 ` Alessandro Corradi
2 siblings, 1 reply; 6+ messages in thread
From: Alessandro Corradi @ 2006-11-04 16:08 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
Thank you very much for the answer,
so the only think to do to raise correctly an interrupt (I think) is only to
raise it when a read funciton is completed (in case of my simple memory)
because it will alarm the process in waiting status to read the value in the
register.
the workaround of a read operation of a cell of this memory is:
1)write address of the cell that I want to read in the address register,
2)send the execution request to get the value of the cell indicated by the
address reg (write on the command register the read opcode),
3)wait for control register response untill read operation is executed.
4)read the data register.
so I think that interrupt request must be between point 3 and 4.
Do you agree with my consideration?
I hope that writed something understandable :)
Thanks
Ale
2006/11/2, Paul Brook <paul@codesourcery.com>:
>
> On Wednesday 01 November 2006 23:25, Roger Lathrop wrote:
> > Alessandro,
> >
> > All you should need to do to raise an IRQ in your code is:
> > pic_set_irq(s->irq,1);
> >
> > When the irq is serviced (in one of your ioport traps, I would assume),
> > knock the irq down:
> > pic_set_irq(s->irq,0);
>
> No. You should use pic_set_irq_new. Otherwise your code will break on
> machines
> with multiple interrupt controllers.
>
> Paul
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
[-- Attachment #2: Type: text/html, Size: 1913 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Fwd: [Qemu-devel] Interrupt request info
2006-11-04 16:08 ` Alessandro Corradi
@ 2006-11-06 14:39 ` Alessandro Corradi
0 siblings, 0 replies; 6+ messages in thread
From: Alessandro Corradi @ 2006-11-06 14:39 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
---------- Forwarded message ----------
From: Alessandro Corradi <ale.corradi@gmail.com>
Date: 4-nov-2006 17.08
Subject: Re: [Qemu-devel] Interrupt request info
To: qemu-devel@nongnu.org
Thank you very much for the answer,
so the only think to do to raise correctly an interrupt (I think) is only to
raise it when a read funciton is completed (in case of my simple memory)
because it will alarm the process in waiting status to read the value in the
register.
the workaround of a read operation of a cell of this memory is:
1)write address of the cell that I want to read in the address register,
2)send the execution request to get the value of the cell indicated by the
address reg (write on the command register the read opcode),
3)wait for control register response untill read operation is executed.
4)read the data register.
so I think that interrupt request must be between point 3 and 4.
Do you agree with my consideration?
I hope that writed something understandable :)
Thanks
Ale
2006/11/2, Paul Brook <paul@codesourcery.com>:
>
> On Wednesday 01 November 2006 23:25, Roger Lathrop wrote:
> > Alessandro,
> >
> > All you should need to do to raise an IRQ in your code is:
> > pic_set_irq(s->irq,1);
> >
> > When the irq is serviced (in one of your ioport traps, I would assume),
> > knock the irq down:
> > pic_set_irq(s->irq,0);
>
> No. You should use pic_set_irq_new. Otherwise your code will break on
> machines
> with multiple interrupt controllers.
>
> Paul
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
[-- Attachment #2: Type: text/html, Size: 2563 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Interrupt request info
2006-11-01 23:31 ` [Qemu-devel] " Paul Brook
2006-11-04 16:08 ` Alessandro Corradi
@ 2006-11-11 11:32 ` Alessandro Corradi
2006-11-12 15:46 ` Alessandro Corradi
2 siblings, 0 replies; 6+ messages in thread
From: Alessandro Corradi @ 2006-11-11 11:32 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]
Thank you very much,
But I don't understand what the first parameter is on pic_set_irq_new...
I tried anyway to implement my hw with pic_set_irq, but in qemu console I
didn't see my irq (13) with info irq.
I tried to raise it: pic_set_irq(s->irq,1);
What I need to do to raise irq correctly with pic_set_irq_new specially the
first parameter)?
Thank you
2006/11/2, Paul Brook <paul@codesourcery.com>:
>
> On Wednesday 01 November 2006 23:25, Roger Lathrop wrote:
> > Alessandro,
> >
> > All you should need to do to raise an IRQ in your code is:
> > pic_set_irq(s->irq,1);
> >
> > When the irq is serviced (in one of your ioport traps, I would assume),
> > knock the irq down:
> > pic_set_irq(s->irq,0);
>
> No. You should use pic_set_irq_new. Otherwise your code will break on
> machines
> with multiple interrupt controllers.
>
> Paul
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
[-- Attachment #2: Type: text/html, Size: 1437 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Interrupt request info
2006-11-01 23:31 ` [Qemu-devel] " Paul Brook
2006-11-04 16:08 ` Alessandro Corradi
2006-11-11 11:32 ` Alessandro Corradi
@ 2006-11-12 15:46 ` Alessandro Corradi
2 siblings, 0 replies; 6+ messages in thread
From: Alessandro Corradi @ 2006-11-12 15:46 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
I tried with both pic_set_irq and pic_set_irq_new but nothing happen (the
irq number is 13 and I verified with info irq in qemu monitor).
I tried also to hack i8259.c and the function is not called (I think).
What the first parameter of pic_set_irq_new is referred to?
Another question: why a new virtual device works anyway without interrupt
mechanism? isn't it essential?
Thanks
Ale
2006/11/2, Paul Brook <paul@codesourcery.com>:
>
> On Wednesday 01 November 2006 23:25, Roger Lathrop wrote:
> > Alessandro,
> >
> > All you should need to do to raise an IRQ in your code is:
> > pic_set_irq(s->irq,1);
> >
> > When the irq is serviced (in one of your ioport traps, I would assume),
> > knock the irq down:
> > pic_set_irq(s->irq,0);
>
> No. You should use pic_set_irq_new. Otherwise your code will break on
> machines
> with multiple interrupt controllers.
>
> Paul
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
[-- Attachment #2: Type: text/html, Size: 1470 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-11-12 15:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200611011205.1gFjwA1qs3Nl3pX2@cave.mail.atl.earthlink.net>
2006-11-01 23:25 ` Re:[Qemu-devel] Interrupt request info Roger Lathrop
2006-11-01 23:31 ` [Qemu-devel] " Paul Brook
2006-11-04 16:08 ` Alessandro Corradi
2006-11-06 14:39 ` Fwd: " Alessandro Corradi
2006-11-11 11:32 ` Alessandro Corradi
2006-11-12 15:46 ` Alessandro Corradi
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).