qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Williams <john.williams@petalogix.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Alexander Graf <agraf@suse.de>,
	Rob Herring <rob.herring@calxeda.com>,
	qemu-devel@nongnu.org, Grant Likely <grant.likely@secretlab.ca>,
	Paul Brook <paul@codesourcery.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Jeremy Kerr <jeremy.kerr@canonical.com>
Subject: Re: [Qemu-devel] [PATCH v2] arm: add device tree support
Date: Wed, 1 Feb 2012 12:40:21 +1000	[thread overview]
Message-ID: <CACPZLaVNZPUx6FBg3LvHKBiNx_2s1g-fEE7Ef46QTu+hD7jfMQ@mail.gmail.com> (raw)
In-Reply-To: <4F28A554.4090000@codemonkey.ws>

On Wed, Feb 1, 2012 at 12:37 PM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 01/31/2012 07:44 PM, Alexander Graf wrote:
>>
>>
>> On 01.02.2012, at 02:35, Paul Brook wrote:
>>
>>>> We could also just change machine->init() and pass the dtb in there. In
>>>> a
>>>> QOM world these would become machine device properties anyways.
>>>>
>>>>    machine->init(ram_size, boot_devices,
>>>>                  kernel_filename, kernel_cmdline, initrd_filename,
>>>> cpu_model);
>>>>
>>>> Essentially we shouldn't treat -dtb any different than -kernel or
>>>> -initrd.
>>>> It's also useful for more than ARM, namely embedded ppc systems. But I
>>>> can
>>>> easily post a follow-up patch for those.
>>>
>>>
>>> Changing machine->init means you have to touch every single board file,
>>> and
>>> clone the exact same code for every machine that uses arm_boot.c.  All of
>>> which will be rewritten in the near future.
>>
>>
>> Well, the dt file name would have to be passed into the generic arm_boot.c
>> function, yes. But that's something that we need to do at one point in time
>> either way, because machines will want to have default dtb file names.
>>
>>> machine->init is a particularly suckiy interface to start with, we want
>>> to be
>>> using it less, not more.  It's not like we're going support multiple
>>> machine
>>> instanced.  At least not before machine->init is removed altogether.
>>
>>
>> I do see your point on not extending legacy interfaces though and not
>> bloating up the patch. In fact, I'm indifferent enough on the actual
>> implementation atm, as long as the command line interface (or whatever the
>> user sees) is reasonably sane. And it is IMHO. So if it makes everything
>> easier, do it using a global, but keep in mind that this will need
>> refactoring.
>
>
> Globals are even worse!
>
> Can't you hear the kernel loader begging to be turned into a device?  It's
> pleading with us to stop abusing other parts of QEMU and make it a first
> class citizen of QEMU.

Is there some kind of initialisation phase where such a device can do its thing?

Unless I'm missing something a "loader" device will be racing the rest
of the VM after reset to populate the memory with the desired
contents, no?

John
-- 
John Williams, PhD, B. Eng, B. IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com  p: +61-7-30090663  f: +61-7-30090663

  reply	other threads:[~2012-02-01  2:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01  0:11 [Qemu-devel] [PATCH v2] arm: add device tree support Grant Likely
2012-02-01  1:10 ` Alexander Graf
2012-02-01  1:35   ` Paul Brook
2012-02-01  1:44     ` Alexander Graf
2012-02-01  2:37       ` Anthony Liguori
2012-02-01  2:40         ` John Williams [this message]
2012-02-01 13:04           ` Anthony Liguori
2012-02-01 13:10             ` Peter Maydell
2012-02-01 13:25               ` Anthony Liguori
2012-02-01 13:32                 ` Alexander Graf
2012-02-01 13:44                   ` Anthony Liguori
2012-02-01 13:49                     ` Alexander Graf
2012-02-01 13:52                       ` Anthony Liguori
2012-02-01 13:55                         ` Alexander Graf
2012-02-01 15:13                           ` Anthony Liguori
2012-02-01 17:38       ` Grant Likely
2012-02-01 20:59         ` Alexander Graf
2012-02-01  2:35     ` Anthony Liguori
2012-02-22 19:42   ` 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=CACPZLaVNZPUx6FBg3LvHKBiNx_2s1g-fEE7Ef46QTu+hD7jfMQ@mail.gmail.com \
    --to=john.williams@petalogix.com \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=edgar.iglesias@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=jeremy.kerr@canonical.com \
    --cc=paul@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob.herring@calxeda.com \
    /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).