qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Jeremy Kerr <jeremy.kerr@canonical.com>,
	qemu-devel@nongnu.org, Rob Herring <rob.herring@calxeda.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] arm: add device tree support
Date: Sun, 29 Jan 2012 11:15:42 +0000	[thread overview]
Message-ID: <201201291115.43916.paul@codesourcery.com> (raw)
In-Reply-To: <20120128184837.GG2501@ponder.secretlab.ca>

> There is a lot of configuration in the .dts file that the QEMU user may
> want to manipulate; particularly when using QEMU for testing embedded
> platforms. The direction I want to go is to select the machine model based
> on the top level DT compatible property (making -M optional), and then
> also allow a lot of the machine layout to be driven by DT data.  ie.
> populate emulated devices from DT data.

I want to remove -M, and the associated board specific knowledge altogether.  
A system that can only create limited variants of hardcoded boards is IMO not 
a viable medium/long term solution.

> > This gets slightly more interesting when you have custom machine variants
> > (i.e. once we fix the object model, and have proper dynamic machine
> > construction).  Even then I'd expect the FDT to be derived
> > from/specificed by the machine description, not a separate option.
> 
> I started with going down that route, but switched to this model after
> playing with it and noticing that it doesn't seem to fit as well for
> embedded development as providing a .dtb file and having QEMU
> construct a machine that matches the data.

Problem is that a FDT doesn't really tell you everything you need to know in 
order to construct the machine.  If you look back in the archives you should 
find that I tried something similar when I first added the qdev code.  While 
it appears to be a nice idea at first, it doesn't actually work do well in 
practice.  It's maybe OK for simple embedded systems with a single system bus, 
but when you start looking at more sophisticated machines it doesn't fit so 
well.  In particular when you look at things like PCI, devices connected via 
multiple busses (a sound codec with both I2C [command] and I2S [data] 
connections), and some of the stranger bus topographies (some ppc boards have 
lots of weirdness in the FDT) the requirements of qemu and linux start to 
diverge.

Clearly we need to have some sort of FDT support.  However I'm unconvinced 
that it's the correct format for the primary data structure.  For one thing 
it's a hierarchical tree structure, and in my experience describing links 
outside that structure gets hairy.  One of the things we're doing with QOM is 
move from a hierarchical tree/bus to a more general connected web of links 
between devices.

Paul

  reply	other threads:[~2012-01-29 11:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 21:53 [Qemu-devel] [PATCH] arm: add device tree support Grant Likely
2012-01-27 22:34 ` Paul Brook
2012-01-28 18:48   ` Grant Likely
2012-01-29 11:15     ` Paul Brook [this message]
2012-01-29 16:01       ` Grant Likely
2012-01-29 18:48         ` Andreas Färber
2012-01-29 21:29           ` Peter Maydell
2012-01-30 13:33             ` Grant Likely
2012-01-29 19:13         ` Peter Maydell
2012-01-29 20:36           ` Grant Likely
2012-01-30 11:36             ` Andreas Färber
2012-01-30 13:31               ` Grant Likely
2012-01-30  0:24           ` John Williams
2012-01-29 20:42     ` Edgar E. Iglesias
2012-01-29 23:54       ` Peter Crosthwaite
2012-01-30 13:40         ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2012-01-29  7:48 Peter Crosthwaite
2012-02-22 19:48 Peter Maydell
2012-02-27 17:38 Peter Maydell
2012-02-27 17:41 ` Anthony Liguori

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=201201291115.43916.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=jeremy.kerr@canonical.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).