qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alessandro Corradi" <ale.corradi@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: Fwd: [Qemu-devel] Interrupt request info
Date: Wed, 1 Nov 2006 10:19:14 +0100	[thread overview]
Message-ID: <b921df970611010119h6efa0cb8rea53b72429aa231e@mail.gmail.com> (raw)
In-Reply-To: <b921df970610310125gf987001y8ce03fc1fb8ce363@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2742 bytes --]

---------- Forwarded message ----------
From: Alessandro Corradi <ale.corradi@gmail.com>
Date: 31-ott-2006 10.25
Subject: Re: [Qemu-devel] Interrupt request info
To: Rob Landley <rob@landley.net>

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 < rob@landley.net >:
>
> On Saturday 28 October 2006 5:36 am, Alessandro Corradi wrote:
> > 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
>
> > 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
> --
> "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
>

[-- Attachment #2: Type: text/html, Size: 5071 bytes --]

  parent reply	other threads:[~2006-11-01  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-28  9:36 [Qemu-devel] Interrupt request info Alessandro Corradi
2006-10-28 19:01 ` Rob Landley
     [not found]   ` <b921df970610310125gf987001y8ce03fc1fb8ce363@mail.gmail.com>
2006-11-01  9:19     ` Alessandro Corradi [this message]
2006-11-01 17:16       ` Fwd: " Paul Brook
     [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
2006-11-04 16:08     ` Alessandro Corradi
2006-11-06 14:39       ` Fwd: " Alessandro Corradi

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=b921df970611010119h6efa0cb8rea53b72429aa231e@mail.gmail.com \
    --to=ale.corradi@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).