From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Dave Martin <dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Nicolas Pitre
<nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: RFC: Host-endian device tree format
Date: Thu, 20 Jan 2011 09:47:55 +1000 [thread overview]
Message-ID: <20110119234755.GA20128@yookeroo> (raw)
In-Reply-To: <AANLkTim7F8PBd_4zmQY7717N7CoiGvvyX473CL=6qCaj-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Jan 19, 2011 at 04:09:39PM +0000, Dave Martin wrote:
> On Wed, Jan 19, 2011 at 3:52 PM, Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
> > On Wed, Jan 19, 2011 at 8:41 AM, Nicolas Pitre <nicolas.pitre-QSEj5FYQhm5QFI55V6+gNQ@public.gmane.orgg> wrote:
> >> On Wed, 19 Jan 2011, Dave Martin wrote:
> >>> On Wed, Jan 19, 2011 at 1:41 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> >>> > The dtb isn't so much bigendian as it is network byte order.
> >>>
> >>> (For me, "network byte order" is a euphemism ... <insert
> >>> unconstructive rant here>)
> >>
> >> I concur.
> >
> > meh. it's all about conventions. When talking about external data, it
> > is far more important for everyone to agree on the same representation
> > than it is to tailor to each platforms preferences. That said, rant
> > away! I love a good tangent.
>
> I guess a good example of what I mean is ELF - the endianness of an
> ELF image is discoverable, and cross tools do exist -- but because ELF
> images are strongly bound to their target platform, running the image
> takes precedence over the simplicity of the tools: so the images are
> specified in such a way that they can always be host-endian for the
> machine they run on, without creating format ambiguities.
Yes, there's no technical impediment to making a little-endian dtb
format. In fact dtc and libfdt were written with this possibility in
mind, to the extent that there are hooks / functions in the right
places to make this reasonably straightforward.
The fact that there are actually two questions here - the endianness
of the framing dtb format, and the endianness of the property values
themselves complicates the issue.
> Of course, it's stretching things rather a lot to claim that fdt
> parsing is performance critical ... or that ELF cross tools work well
> in all host/target combinations ... rather it's a niggle.
But, there is just no point in creating a variant format. The
performance cost is completely negligible (even using the rather
stupid conversion macros from libfdt which gcc generates horrible code
for).
The simplicity of having only one variant for tools to deal with wins,
no contest.
--
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:[~2011-01-19 23:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 10:43 RFC: Host-endian device tree format Dave Martin
[not found] ` <AANLkTi=AdwaW5vvm1TzNxcNrjYiJ3dOEjwoZrm-koxuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-19 13:41 ` Grant Likely
2011-01-19 14:55 ` Dave Martin
[not found] ` <AANLkTi=xdJ_c3LvCFkeqBRNDf6TSC40Fjxihm9eSeMmf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-19 15:41 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1101191031481.8580-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2011-01-19 15:52 ` Grant Likely
[not found] ` <AANLkTi==KLWXAv79u32ioQ9eSr7JEii7fW93WPPNdAez-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-19 16:05 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1101191101230.8580-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2011-01-19 16:07 ` Grant Likely
2011-01-19 17:47 ` Segher Boessenkool
2011-01-19 16:09 ` Dave Martin
[not found] ` <AANLkTim7F8PBd_4zmQY7717N7CoiGvvyX473CL=6qCaj-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-19 23:47 ` David Gibson [this message]
2011-01-20 9:28 ` Dave Martin
2011-01-19 18:19 ` Scott Wood
2011-01-19 20:10 ` Mikael Pettersson
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=20110119234755.GA20128@yookeroo \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).