From: David Gibson <david@gibson.dropbear.id.au>
To: Markus Armbruster <armbru@redhat.com>
Cc: devicetree-discuss@ozlabs.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Machine description as data
Date: Fri, 13 Feb 2009 11:37:24 +1100 [thread overview]
Message-ID: <20090213003724.GA8104@yookeroo.seuss> (raw)
In-Reply-To: <87k57w0x4r.fsf@pike.pond.sub.org>
On Thu, Feb 12, 2009 at 11:26:12AM +0100, Markus Armbruster wrote:
> Hollis Blanchard <hollisb@us.ibm.com> writes:
[snip]
> > I won't say IEEE1275 is perfect, but IMHO it would be pretty silly to
> > reinvent all the design and infrastructure for a similar-but-different
> > device tree.
> >
> > [Patch snipped]
>
> I'm not at all opposed to adapting FDT for QEMU use. My patch is a
> prototype, and I'm prepared to throw away some or all of it.
>
> To get this thing started, I wanted working code to demonstrate what I'm
> talking about. If I had dug deeper into FDTs first, we would not be
> talking now.
>
> The task I outlined in my memo involves much more than just coming up
> with a device tree data structure. That data structure is to me one
> detail among many, and a much less hairy one than most others. It
> certainly was for the prototype.
>
> If I read the comments correctly (all comments, not just this one), the
> only real issue with my proposal is you'd rather use FDT for the config
> tree. I don't mind, except I don't know enough about that stuff to do
> it all by myself, at least not in a reasonable time frame. I think I
> understand the concepts, can read .dts files with some head-scratching,
> and I could perhaps even write one if I sacrificed a chicken or two.
> Designing a binding, however, feels well above my level of
> (in)competence.
>
> So, to make FDT happen, I need help. Specifically:
>
> * Point me to the FDT code I'm supposed to integrate. I'm looking for
> basic decorated tree stuff: create trees, traverse them, get and put
> properties, add and delete nodes, read and write them as plain,
> human-readable text.
dtc and libfdt is a good place to start, if you haven't yet
investigated them:
git://git.jdl.com/software/dtc.git
Note that although they're distributed together as one tree, dtc and
libfdt are essentially independent pieces of software. dtc converts
device trees between various formats, dts and dtb in particular.
libfdt does a number of the things you mention with flat trees -
get/set properties, build trees, traverse etc. If it doesn't do
everything you need, we can probably extend it so that it does: I want
libfdt to be *the* library for manipulating trees in the fdt forma.
It's designed to be easy to embed in other packages for this reason,
although it does have some usage peculiarities because in particular
it's possible to integrate into very limited environments like
firmwares.
[Jon Loeliger is the current maintainer of dtc and libfdt, but I
originally wrote both of them - I know as much about them as anyone
does]
> * Provide an example tree describing a bare-bones PC, like the one in my
> prototype: CPU, RAM, BIOS, PIC, APIC, IOAPIC, PIT, DMA, UART, parallel
> port, floppy controller, CMOS & RTC, a20 gate (port 92) and other
> miscellanous I/O ports, i440fx, PIIX3 (ISA bridge, IDE, USB, ACPI),
> Cirrus VGA with BIOS, some PCI NIC. This gives us all an idea of the
> tree structure. Morphing that into something suitable for QEMU
> configuration shouldn't be too hard then, just an exercice in
> redecorating the tree.
I don't off hand know any trees for a PC system. There are a bunch of
example trees for powerpc systems in arch/powerpc/boot/dts in the
kernel tree. A few of those, such as prep, at least have parts which
somewhat resemble a PC. I believe the OLPC also has OF; that would be
an example OF tree for an x86 machine, if not a typical PC.
> * Advice as we go.
I'll do what I can.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2009-02-13 0:37 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 15:40 [Qemu-devel] [RFC] Machine description as data Markus Armbruster
2009-02-11 16:31 ` Ian Jackson
2009-02-11 17:43 ` Markus Armbruster
2009-02-11 18:57 ` Hollis Blanchard
2009-02-12 3:50 ` David Gibson
2009-02-11 18:50 ` Hollis Blanchard
2009-02-11 19:34 ` Blue Swirl
2009-02-12 4:01 ` David Gibson
2009-02-12 10:26 ` Markus Armbruster
2009-02-12 12:49 ` Carl-Daniel Hailfinger
2009-02-12 16:46 ` M. Warner Losh
2009-02-12 18:29 ` Markus Armbruster
2009-02-12 23:58 ` Carl-Daniel Hailfinger
2009-02-13 11:19 ` Markus Armbruster
2009-02-13 1:05 ` David Gibson
2009-02-12 23:35 ` Carl-Daniel Hailfinger
2009-02-12 23:58 ` Paul Brook
2009-02-13 0:32 ` Carl-Daniel Hailfinger
2009-02-13 0:47 ` Jamie Lokier
2009-02-13 1:46 ` David Gibson
2009-02-13 14:32 ` Lennart Sorensen
2009-02-13 0:05 ` M. Warner Losh
2009-02-12 17:52 ` Hollis Blanchard
2009-02-12 18:53 ` Markus Armbruster
2009-02-12 19:33 ` Mitch Bradley
2009-02-13 0:59 ` David Gibson
2009-02-13 1:00 ` David Gibson
2009-02-13 0:43 ` David Gibson
2009-02-13 2:11 ` Carl-Daniel Hailfinger
2009-02-13 2:17 ` David Gibson
2009-02-13 2:45 ` DTS syntax and DTC patches (was: Re: [Qemu-devel] [RFC] Machine description as data) Carl-Daniel Hailfinger
2009-02-13 2:51 ` David Gibson
2009-02-13 20:04 ` [Qemu-devel] [RFC] Machine description as data Jon Loeliger
2009-02-13 20:15 ` Carl-Daniel Hailfinger
2009-02-13 20:19 ` Jon Loeliger
2009-02-12 10:26 ` Markus Armbruster
2009-02-12 12:36 ` Carl-Daniel Hailfinger
2009-02-12 16:07 ` Paul Brook
2009-02-12 17:17 ` Blue Swirl
2009-02-12 18:09 ` Marcelo Tosatti
2009-02-13 0:37 ` David Gibson [this message]
2009-02-13 11:26 ` Markus Armbruster
2009-02-13 12:06 ` Paul Brook
2009-02-13 12:48 ` Markus Armbruster
2009-02-13 13:33 ` Paul Brook
2009-02-13 14:13 ` Markus Armbruster
2009-02-13 14:25 ` Paul Brook
2009-02-13 15:47 ` Jamie Lokier
2009-02-13 18:36 ` Mitch Bradley
2009-02-13 19:49 ` Markus Armbruster
2009-02-13 19:51 ` Mitch Bradley
2009-02-16 3:42 ` David Gibson
2009-02-16 16:39 ` Markus Armbruster
2009-02-17 3:29 ` David Gibson
2009-02-17 7:54 ` Markus Armbruster
2009-02-17 17:44 ` Paul Brook
2009-02-18 8:36 ` Markus Armbruster
2009-02-11 19:01 ` Anthony Liguori
2009-02-11 19:36 ` Blue Swirl
2009-02-11 19:56 ` Anthony Liguori
2009-02-12 10:25 ` Markus Armbruster
2009-02-16 16:22 ` [Qemu-devel] Machine description as data prototype, take 2 (was: [RFC] Machine description as data) Markus Armbruster
2009-02-17 17:32 ` Paul Brook
2009-02-18 8:42 ` [Qemu-devel] Machine description as data prototype, take 2 Markus Armbruster
2009-02-19 10:29 ` [Qemu-devel] Machine description as data prototype, take 3 (was: [RFC] Machine description as data) Markus Armbruster
2009-02-19 13:53 ` Paul Brook
2009-02-19 14:55 ` [Qemu-devel] Machine description as data prototype, take 3 Markus Armbruster
2009-02-19 15:03 ` Paul Brook
2009-02-19 14:36 ` Anthony Liguori
2009-02-19 15:00 ` Markus Armbruster
2009-02-19 14:49 ` Anthony Liguori
2009-02-23 17:38 ` Markus Armbruster
2009-02-23 18:58 ` Anthony Liguori
2009-02-24 9:08 ` Markus Armbruster
2009-02-19 16:40 ` [Qemu-devel] Machine description as data prototype, take 3 (was: [RFC] Machine description as data) Blue Swirl
2009-02-19 18:30 ` [Qemu-devel] Machine description as data prototype, take 3 Markus Armbruster
2009-02-20 18:14 ` Blue Swirl
2009-02-20 18:20 ` Paul Brook
2009-02-23 12:00 ` Markus Armbruster
2009-02-23 12:18 ` Markus Armbruster
2009-02-23 18:00 ` [Qemu-devel] Machine description as data prototype, take 4 (was: [RFC] Machine description as data) Markus Armbruster
2009-02-24 20:06 ` Blue Swirl
2009-02-25 12:13 ` [Qemu-devel] Machine description as data prototype, take 4 Markus Armbruster
2009-02-25 20:11 ` Blue Swirl
2009-03-03 17:46 ` [Qemu-devel] Machine description as data prototype, take 5 (was: [RFC] Machine description as data) Markus Armbruster
2009-03-12 18:43 ` [Qemu-devel] Machine description as data prototype, take 6 " Markus Armbruster
2009-03-17 16:06 ` [Qemu-devel] Machine description as data prototype, take 6 Paul Brook
2009-03-17 17:32 ` Markus Armbruster
2009-03-23 15:50 ` [Qemu-devel] Re: [RFC] Machine description as data Markus Armbruster
2009-03-23 15:53 ` Markus Armbruster
2009-03-31 9:16 ` Markus Armbruster
2009-04-17 16:04 ` Markus Armbruster
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=20090213003724.GA8104@yookeroo.seuss \
--to=david@gibson.dropbear.id.au \
--cc=armbru@redhat.com \
--cc=devicetree-discuss@ozlabs.org \
--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).