All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@axis.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH]: add leon target
Date: Thu, 8 Jan 2009 11:33:29 +0100	[thread overview]
Message-ID: <20090108103328.GC26971@edgar.se.axis.com> (raw)
In-Reply-To: <7B084501-75D2-4E83-AA6B-EC8FD8B945A4@adacore.com>

On Thu, Jan 08, 2009 at 11:09:45AM +0100, Tristan Gingold wrote:
>>>
>
> Hi,
>
>
>>> I have the same feeling too.  I am ready to improve the code but I need a
>>> few advices.
>>> As currently implemented CPU emulation know about interrupt controller.
>>> Wether interrupt controller
>>> belongs to CPU or to the board is an open question :-)
>>> Do you simply prefer to have hooks in CPUSPARCState ?
>>
>> From my experience, interrupt controllers are usually not considered to
>> be part of the CPU.
>
> (What about LAPIC/LSAPIC ?)

There are ofcourse exceptions :)

>
>> Regarding the leon interrupt controller, I had a quick look at the vhdl 
>> and
>> AFAICT there is no need for any special tricks in the sparc cpu model.
>> What you need is to handle accesses to the interrupt clear register, in 
>> your
>> code you seem to call it ITC and your io_writel does not handle it.
>> This is the place to hook in calls to mask off bits from the pending
>> interrupt reg.
>>
>> Your leon software should be writing to this register when acking
>> interrupts.
>
> No.  You have missed (p19):
>
> When the IU acknowledges the interrupt, the corresponding pending bit will
> automatically be cleared.
>
> This is the only reason why the CPU must inform the interrupt controller.
>

Not sure what docs you are refering to, but I had a second look at the
vhd and you seem to be correct. Odd...

Best regards

  reply	other threads:[~2009-01-08 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 10:24 [Qemu-devel] [PATCH]: add leon target Tristan Gingold
2009-01-07 10:32 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-07 11:17   ` Tristan Gingold
2009-01-07 17:03 ` Blue Swirl
2009-01-08  8:53   ` Tristan Gingold
2009-01-08 10:01     ` Edgar E. Iglesias
2009-01-08 10:09       ` Tristan Gingold
2009-01-08 10:33         ` Edgar E. Iglesias [this message]
2009-01-08 10:43           ` Tristan Gingold
2009-01-08 11:10             ` Edgar E. Iglesias

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=20090108103328.GC26971@edgar.se.axis.com \
    --to=edgar.iglesias@axis.com \
    --cc=gingold@adacore.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.