linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org, Arnd Bergmann <arnd@arndb.de>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: Could the DTS experts look at this?
Date: Tue, 12 Feb 2008 13:45:39 -0600	[thread overview]
Message-ID: <47B1F763.9000404@freescale.com> (raw)
In-Reply-To: <fa686aa40802121134i4bc0c9bep30920a5afdeb240c@mail.gmail.com>

Grant Likely wrote:

> Then use a local version in the data; don't overload the purpose of
> the dtb version.

I don't know what you mean by that.

> I don't think it is yet possible to define a reasonable 'standard
> manner' for massaging device trees.  There are going to be a lot of
> experiments and false starts before we come to consensus on common
> manipulations which everyone will want to have access too.  Therefore
> for the time being dtb fixups and manipulations will remain a board
> specific thing.

That's okay with me.  I'm just proposing one method that I like, and Scott 
proposed another.

> And when something comes along that doesn't fit into that model?  Add
> more constructs?

If necessary, yes.  What's wrong with expanding the power of the device tree 
format when it solves more problems?

>  I say better to handle that within the existing data
> format.

And the point I've been trying to make is that we have real problems today that 
cannot be solved elegantly with the current device tree problem.  Having 
board-specific code in U-Boot that is hard-coded to look for specific nodes in 
the device tree, and making hard-coded edits on that tree, is *not* elegant.

>  If we get it wrong, then we just change the affected device
> trees and boot loaders.  We don't have to upgrade every platform that
> uses dt blobs.

Only the platforms that need to take advantage of conditional nodes need to be 
upgraded in the first place.  Most platforms are happy with just one device tree.

>> That's okay too, except that if we just add additional nodes that describe
>> conditions, then we need to make sure that whatever parses that DTB must also
>> parse those additional nodes.  The only way to do that is create a new version
>> number, like 18, which is marked as being incompatible with the current version
>> (17).  Otherwise, a person could pass that DTB to an old version of U-Boot, and
>> U-boot will just pass it on to the kernel as-is.
> 
> That's not a dtb version issue.  That is a dtb content issue. 

Technically, that's true, but ...

> It does
> not warrant changing the dtb version number.

Then how do you solve the problem of passing a device tree to a boot loader that 
does not know how to parse it properly?  A device tree with these additional 
nodes *must* be parsed by a boot loader that is aware of them.  Otherwise, it 
will pass the device tree as-is to the kernel without warning.  This is a bad 
thing, and steps should be taken to prevent that.  If you can think of a way to 
make this happen without changing the version number, I'd love to hear.  All I'm 
hearing from you now is denial that this is a problem.

>>> We've already got that issue.  If you pass the device tree for the
>>> wrong board it will still validate correctly, but the board is not
>>> going to boot.
>> There's nothing stopping U-Boot today from scanning the device tree and making
>> sure the SOC's compatible node is correct.  That's not currently done, but it
>> could be.
> 
> Fair enough, and it is also reasonable for the boot loader to look for
> a specific property name to decide how to massage the data structure.
> This alone does not require a dtb version change.

Current versions of U-Boot do not know how to do this.  So again, I'm asking 
you: how do you solve the problem of passing a device tree with additional nodes 
to a boot loader that does not know how to parse them properly?  How do you 
prevent that old U-Boot from ignoring those nodes?

> I'm not missing the point because I disagree entirely with the
> addition of conditional expressions to the device tree.  Instead, I
> think properties can be added to the device tree that a bootloader can
> look for and decide to apply conditions against them which means the
> conditions are encoded in the boot loader, not the device tree.  (the
> device tree simply contains data which supports the boot loaders
> decision; a rather different thing).

Then why bother passing a DTB to the boot loader at all?  Why not just have the 
boot loader create the device tree from scratch?


-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2008-02-12 19:45 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 23:30 Could the DTS experts look at this? Sean MacLennan
2008-02-10  5:47 ` Arnd Bergmann
2008-02-10  6:05   ` Sean MacLennan
2008-02-11 17:57   ` Timur Tabi
2008-02-11 23:54     ` David Gibson
2008-02-11 23:56       ` David Gibson
2008-02-12  0:21         ` Arnd Bergmann
2008-02-12  0:36           ` David Gibson
2008-02-12 18:51             ` Scott Wood
2008-02-12 23:17               ` David Gibson
2008-02-12 23:41                 ` Timur Tabi
2008-02-12 23:50                   ` David Gibson
2008-02-12 15:44           ` Timur Tabi
2008-02-12 18:58             ` Grant Likely
2008-02-12 19:08               ` Timur Tabi
2008-02-12 19:34                 ` Grant Likely
2008-02-12 19:45                   ` Timur Tabi [this message]
2008-02-12 20:43                     ` Grant Likely
2008-02-12 23:35                     ` David Gibson
2008-02-12 23:50                       ` Timur Tabi
2008-02-13  0:10                       ` Grant Likely
2008-02-12 23:26                 ` David Gibson
2008-02-12 23:47                   ` Timur Tabi
2008-02-13  0:08                     ` David Gibson
2008-02-13  0:15                     ` Grant Likely
2008-02-12 23:21             ` David Gibson
2008-02-11  0:14 ` David Gibson
2008-02-11  2:40   ` Sean MacLennan
2008-02-11  3:11     ` David Gibson
2008-02-11  3:49       ` Sean MacLennan
2008-02-11 23:59         ` David Gibson
2008-02-12  1:07           ` Sean MacLennan
2008-02-12  0:20             ` David Gibson
2008-02-12  0:41               ` Sean MacLennan
2008-02-12  0:48                 ` David Gibson
2008-02-12 18:52                 ` Scott Wood
2008-02-12 19:03                   ` Grant Likely
2008-02-12 19:10                     ` Scott Wood
2008-02-17 10:22                       ` David Woodhouse

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=47B1F763.9000404@freescale.com \
    --to=timur@freescale.com \
    --cc=arnd@arndb.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.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).