* In booting-without-of.txt, clarify that properties must precede subnodes
@ 2007-06-28 5:56 David Gibson
2007-06-28 9:24 ` Segher Boessenkool
0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2007-06-28 5:56 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
A strict reading of the flattened device tree format defined in
booting-without-of.txt does in fact require that all the tags defining
properties for a node go before any definitions of subnodes, however
it's not particularly emphasised. Although allowing intermingled
properties and subnodes would not be ambiguous in meaning, the kernel
parser does currently require that properties precede subnodes.
Furthermore, keeping this constraint makes life easier for various
device tree scanning tools.
Therefore, re-emphasise in booting-without-of.txt that this is a
strict requirement of the flattened device tree format.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: working-2.6/Documentation/powerpc/booting-without-of.txt
===================================================================
--- working-2.6.orig/Documentation/powerpc/booting-without-of.txt 2007-06-28 15:47:47.000000000 +1000
+++ working-2.6/Documentation/powerpc/booting-without-of.txt 2007-06-28 15:51:56.000000000 +1000
@@ -626,6 +626,14 @@
a list of properties, a list of child nodes, and an end token. Every
child node is a full node structure itself as defined above.
+NOTE: The above definition requires that all property definitions for
+a particular node MUST precede any subnode definitions for that node.
+Although the structure would not be ambiguous if properties and
+subnodes were intermingled, the kernel parser requires that the
+properties come first (up until at least 2.6.22). Any tools
+manipulating a flattened tree must take care to preserve this
+constraint.
+
4) Device tree "strings" block
In order to save space, property names, which are generally redundant,
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: In booting-without-of.txt, clarify that properties must precede subnodes
2007-06-28 5:56 In booting-without-of.txt, clarify that properties must precede subnodes David Gibson
@ 2007-06-28 9:24 ` Segher Boessenkool
0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2007-06-28 9:24 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Paul Mackerras
> A strict reading of the flattened device tree format defined in
> booting-without-of.txt does in fact require that all the tags defining
> properties for a node go before any definitions of subnodes, however
> it's not particularly emphasised. Although allowing intermingled
> properties and subnodes would not be ambiguous in meaning, the kernel
> parser does currently require that properties precede subnodes.
> Furthermore, keeping this constraint makes life easier for various
> device tree scanning tools.
>
> Therefore, re-emphasise in booting-without-of.txt that this is a
> strict requirement of the flattened device tree format.
Do you want to require this for device tree source files,
too? I think that's how the tools work right now but that's
not made explicit anywhere afaik.
Segher
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-28 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 5:56 In booting-without-of.txt, clarify that properties must precede subnodes David Gibson
2007-06-28 9:24 ` Segher Boessenkool
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).