qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Mark Langsdorf <mark.langsdorf@calxeda.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/9] arm: add missing v7 cp15 registers
Date: Wed, 21 Dec 2011 21:10:25 +0000	[thread overview]
Message-ID: <CAFEAcA8cqi0iHeSukNn28z3VAMQQJyKeEMobJ+2XAY6f1oAH5w@mail.gmail.com> (raw)
In-Reply-To: <4EF20B67.2070502@calxeda.com>

On 21 December 2011 16:37, Mark Langsdorf <mark.langsdorf@calxeda.com> wrote:
> On 12/20/2011 01:48 PM, Peter Maydell wrote:
>> This commit leaves the register with a reset value of 0, which
>> isn't right (we only implement A9MP, not A9UP, so the reset value
>> should be settable by the board at init time somehow depending
>> where the a9mpcore_priv device is mapped. Not sure what the
>> cleanest way to do that is.)
>
> I can add a DEFINE_PROP_UINT32 to a9mpcore_priv, which would give
> anyone who wants to set the property an easy way to do so. I'm
> not sure how to hook the a9mpcore_priv to the CPUARMState, though.
> They don't appear to reference each other.

Yes, we don't really model the private peripherals very sensibly:
they should be an integral part of the CPU but for historical
reasons they've been done as a totally separate device. I don't
think a property is the right thing, though -- ideally the a9mpcore
device should be able to find out for itself where it was mapped.

Avi: is there a way for a device (sysbus device in this case) to
find out for one of its memory regions where it has been mapped
in the address space? The context here is that the Cortex-A9
has a cp15 register whose value is "base address of the private
peripherals", and it would be nice not to have to have boards
saying both "map mmio region at X" and "set property so register
reads as X"... [You could argue that hardware implementations
have to do the equivalent of both of these things separately,
I suppose, but it's still not very pretty.]

thanks
-- PMM

  reply	other threads:[~2011-12-21 21:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20 19:10 [Qemu-devel] [PATCH 3/9] arm: add missing v7 cp15 registers Mark Langsdorf
2011-12-20 19:48 ` Peter Maydell
2011-12-21 16:37   ` Mark Langsdorf
2011-12-21 21:10     ` Peter Maydell [this message]
2011-12-22 10:14       ` Avi Kivity
2011-12-22 12:37         ` Peter Maydell
2011-12-22 12:43           ` Avi Kivity
2011-12-22 14:25             ` Anthony Liguori
2011-12-22 15:26               ` Peter Maydell

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=CAFEAcA8cqi0iHeSukNn28z3VAMQQJyKeEMobJ+2XAY6f1oAH5w@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=avi@redhat.com \
    --cc=mark.langsdorf@calxeda.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).