From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
To: qemu-devel@nongnu.org
Cc: devicetree-discuss@ozlabs.org, Hollis Blanchard <hollisb@us.ibm.com>
Subject: Re: [Qemu-devel] [RFC] Machine description as data
Date: Thu, 12 Feb 2009 13:49:39 +0100 [thread overview]
Message-ID: <49941AE3.1000806@gmx.net> (raw)
In-Reply-To: <87iqng0x3t.fsf@pike.pond.sub.org>
On 12.02.2009 11:26, Markus Armbruster wrote:
> David Gibson <dwg@au1.ibm.com> writes:
>
>
>> On Wed, Feb 11, 2009 at 12:50:28PM -0600, Hollis Blanchard wrote:
>>
>>> On Wed, 2009-02-11 at 16:40 +0100, Markus Armbruster wrote:
>>>
>>>> I briefly examined the DT source format and the tree structure it
>>>> describes for the purpose of QEMU configuration. I decided against
>>>> using it in my prototype because I found it awfully low-level and
>>>> verbose for that purpose (I'm sure it serves the purpose it was designed
>>>> for just fine). Issues include:
>>>>
>>>> * Since the DT is designed for booting kernels, not configuring QEMU,
>>>> there's information that has no place in QEMU configuration, and
>>>> required QEMU configuration isn't there.
>>>>
>>> What's needed is a "binding" in IEEE1275-speak: a document that
>>> describes qemu-specific nodes/properties and how they are to be
>>> interpreted.
>>>
>>> As an example, you could require that block devices contain properties
>>> named "qemu,path", "qemu,backend", etc.
>>>> * Property "reg", which encodes address ranges, does so in terms of
>>>> "cells": #address-cells 32-bit words (big endian) for the address,
>>>> followed by #size-cells words for the size, where #address-cells and
>>>> #size-cells are properties of the enclosing bus. If this sounds
>>>> like gibberish to you, well, that's my point.
>>>>
>> #address-cells and #size-cells takes a little getting used to, but
>> it's really not that bad. It's just a way of representing the fact
>> that different busses have different sized address encodings.
>>
>
> I didn't mean to say they are a bad idea for FDTs, just that they're on
> an awkward level of abstraction for QEMU configuration. There, I'd
> rather express a PCI address as "02:01.0" than as <0x00000220>.
> Translating text to binary is the machine's job, not the user's.
>
Coreboot v3 is using some device tree variant which is IMHO a bit more
user friendly. The tree below is incomplete (for example, it leaves out
the PCI bus number and assumes that it is zero by default), but you
surely get the idea.
/{
mainboard_vendor = "Gigabyte";
mainboard_name = "M57SLI";
cpus { };
apic@0 {
};
domain@0 {
pci@0,0 { /* MCP55 RAM? */
};
pci@1,0 {
/config/("southbridge/nvidia/mcp55/lpc.dts");
ioport@2e {
/config/("superio/ite/it8716f/dts");
com1enable = "1";
ecenable = "1";
kbenable = "1";
mouseenable = "1";
gpioenable = "1";
};
};
pci@1,1 { /* smbus */
};
pci@2,0 { /* usb */
};
pci@2,1 { /* usb */
};
pci@4,0 {
/config/("southbridge/nvidia/mcp55/ide.dts");
ide0_enable = "1";
};
pci@5,0 {
/config/("southbridge/nvidia/mcp55/sata.dts");
sata0_enable = "1";
};
pci@5,1 {
/config/("southbridge/nvidia/mcp55/sata.dts");
sata1_enable = "1";
};
pci@6,0 { /* PCI */
};
pci@6,1 {
/*/config/("southbridge/nvidia/mcp55/audio.dts"); */
};
pci@8,0 {
/*
/config/("southbridge/nvidia/mcp55/nic.dts");
mac_eeprom_smbus = "3";
mac_eeprom_addr = "0x51";
*/
};
pci@f,0 { /* PCIe */
};
pci@18,0 {
/config/("northbridge/amd/k8/pci");
};
pci@18,1 {};
pci@18,2 {};
pci@18,3 {
/config/("northbridge/amd/k8/mcf3");
};
};
};
The /config/("...") statements are basically comparable to #include
"..." in C.
While the syntax pci@dev,fn is different to the bus:dev.fn you're used
to, it's IMHO a lot more readable than <0x00000220>.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
next prev parent reply other threads:[~2009-02-12 12:49 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 [this message]
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
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=49941AE3.1000806@gmx.net \
--to=c-d.hailfinger.devel.2006@gmx.net \
--cc=devicetree-discuss@ozlabs.org \
--cc=hollisb@us.ibm.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).