Interrupt request info
Hello,
Can someone give me detailed information (or a link where it is described) how qemu manage hw interrupts?
I can't find any usefull info about it in QEMU doc.
For example, how does work Interrupts for the parallel port? (I see in the code that it is the easier device to understand how qemu works). I think that it is very usefull for students and newbies to have more detailed documentations about it for understanding virtualizzation/emulation.
Thank you very much
Ale
ps: Obviously, if these information are already present I apologize me in advance, I try to search but nothing was found :)
Quoted 4 lines · Alessandro Corradi
Hello,
Can someone give me detailed information (or a link where it is described) how qemu manage hw interrupts?
I can't find any usefull info about it in QEMU doc.
http://www.qemu.org/qemu-tech.html#SEC18
Quoted 2 lines
ps: Obviously, if these information are already present I apologize me in advance, I try to search but nothing was found :)
The documentation is a bit sparse in places.
Rob
Signature · 2 lines
"Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away." - Antoine de Saint-Exupery
A message that is not in the archive (sent off-list or not yet received): [email protected]
---------- Forwarded message ----------
From: Alessandro Corradi <[email protected]>
Date: 31-ott-2006 10.25
Subject: Re: [Qemu-devel] Interrupt request info
To: Rob Landley <[email protected]>
I already read this, but give no usefull information... and I searched everywhere in the web...
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
struct scmemState {
uint32_t data;
uint32_t addr;
uint32_t control;
uint32_t comm;
int irq;
int irq_pending;
};
scmemState *scmem_init(int base, int irq){
scmemState *s;
s=qemu_mallocz(sizeof(scmemState));
s->irq = irq;
s->data = 0;
s->addr = 0;
s->control = 0;
...
}
static void scmem_ioport_write(void *opaque, uint32_t addr, uint32_t val) {
scmemState *s = opaque;
addr &= 7;
switch(addr) {
case 0:
cosim(1,DATA,val);
s->data = val;
#ifdef SCDEBUG
printf("Writing at 0x738 (data reg) value= %d\n",val);
#endif
break;
case 1:
cosim(1,ADDR,val);
s->addr = val;
#ifdef SCDEBUG
printf("Writing at 0x739 (addr reg) value= %d\n",val);
#endif
break;
case 2:
cosim(1,CONTROL,val);
s->control = val;
#ifdef SCDEBUG
printf("Writing at 0x74a (control reg) value= %d\n",val);
#endif
break;
case 3:
if (val == 0x0003) { //SC socket connection restore
scmem_restore();
} else {
cosim(1,COMM,val);
s->comm = val;
#ifdef SCDEBUG
printf("Writing at 0x74b (comm reg) value= %d\n",val);
#endif
}
break; }
}
2006/10/28, Rob Landley < [email protected] >:
Quoted 21 lines · Alessandro Corradi
Quoted 2 lines
Hello,
Can someone give me detailed information (or a link where it isdescribed)
Quoted 2 lines
how qemu manage hw interrupts?
I can't find any usefull info about it in QEMU doc.http://www.qemu.org/qemu-tech.html#SEC18
Quoted 1 line
ps: Obviously, if these information are already present I apologize me
in
Quoted 1 line
advance, I try to search but nothing was found :)
The documentation is a bit sparse in places.
Rob
--
"Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away." - Antoine de Saint-Exupery
Quoted 7 lines
I already read this, but give no usefull information... and I searched everywhere in the web...
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?
pic_set_irq_new
Paul