public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] RFC: Booting the Linux/ppc64 kernel without Open Firmware HOWTO
Date: Fri, 20 May 2005 13:11:30 +1000	[thread overview]
Message-ID: <1116558690.5153.87.camel@gaston> (raw)
In-Reply-To: <1116541993.5153.22.camel@gaston>

On Fri, 2005-05-20 at 08:33 +1000, Benjamin Herrenschmidt wrote:
> > Marius was talking about the amount of data passed to the kernel.
> 
> A few Kb maybe... Current implementations always provide a full featured
> device-tree with pci devices so they aren't a good example (and I don't
> have numbers in mind at the moment). I'll try to get some later today.
> The property names are factored out (only one copy of a given name) to
> avoid bloat, the node format is very compact, A small device-tree would
> be only about a dozen node (the minimal is 5 nodes including the root)
> with only a few properties 

Ok, I got some numbers here. (I have removed the page alignment
constraint for the DT block and the strings block in the "blob" passed
in btw, I forgot to update v2)
 
 - The minimal example device-tree given as an example in the document
(exactly identical as the one in v2 of the document, which means it may
even shrink more, see below) fits in a blob (complete with header) of
764 bytes.

 - The complete device-tree of my PowerMac laptop (this is _huge_, Apple
puts a _lot_ of stuff in there, way more than most embedded board even
the most complex ones will ever need) fits into a 37k blob.

I will come up with more numbers soon including a good "average" example
that is a Maple board with all the ISA/serial stuff (which is very
useful to have there) but without the individual PCI devices.

On an additional note, I'm also rev'ing up the blob format with
additional space savings in mind:

 - Current version is 2. That's what the kernel recognises and what
current kexec tools generate (well... they actually generate a version 1
but the difference is minor).

 - Version 3 will be backward compatible and just adds a "string table
size" field to the header to help kernel do better memory management
with the flattened device-tree. kexec can implement it, older kernel
will still understand the tree.

 - Version 16 will not be backward compatible (will require kernel
patches, but that should be ok for new board vendors) that allows more
space saving. For this version, I'm planning the following changes for
now:

   * Relax some alignement restrictions (already did it for the numbers
above)
   * Allow replacing of the full path string with only the "name at unit
address" part, letting the kernel reconstruct the full path. With this
change, the "name" property get be dropped in each node as well as in
can be reconstructed by the kernel. There is a lot of redundency in the
full path, so that should save a bit. Side effect is also to remove any
name requirement for the root node.
   * Make the "linux,phandle" property optional. It will only be
required for nodes that are referenced by another node using a phandle
value (typically, nodes part of the interrupt tree).

With those chances, the example minimal tree may shrink down to about
600 bytes (gross estimate), which would mean an average tree with a few
devices would be between one and 3Kb (gross estimate too).

Ben.

  parent reply	other threads:[~2005-05-20  3:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18  7:09 [U-Boot-Users] RFC: Booting the Linux/ppc64 kernel without Open Firmware HOWTO Benjamin Herrenschmidt
2005-05-18  8:12 ` Marius Groeger
2005-05-18 23:11   ` Benjamin Herrenschmidt
2005-05-19  9:52     ` Marius Groeger
2005-05-19 10:22       ` Benjamin Herrenschmidt
2005-05-19 13:18         ` Wolfgang Denk
2005-05-19 19:37           ` Linas Vepstas
2005-05-19 20:18             ` Dan Malek
2005-05-19 22:33           ` Benjamin Herrenschmidt
2005-05-19 23:20             ` Wolfgang Denk
2005-05-19 23:42               ` Benjamin Herrenschmidt
2005-05-20  3:11             ` Benjamin Herrenschmidt [this message]
2005-05-20  7:11               ` Marius Groeger
2005-05-20  7:23                 ` David Gibson
2005-05-20  7:27                 ` Benjamin Herrenschmidt
2005-05-18 23:32   ` Benjamin Herrenschmidt
2005-05-19  4:56 ` [U-Boot-Users] RFC: Booting the Linux/ppc64 kernel without Open Firmware HOWTO (#2) Benjamin Herrenschmidt
2005-05-19  7:46   ` [U-Boot-Users] " Arnd Bergmann
2005-05-19  8:09     ` Benjamin Herrenschmidt
2005-05-19 16:24     ` Segher Boessenkool
2005-05-19 13:18   ` [U-Boot-Users] " Wolfgang Denk
2005-05-19 13:16     ` Pantelis Antoniou
2005-05-19 22:20     ` Benjamin Herrenschmidt
2005-05-19 23:14       ` Wolfgang Denk
2005-05-19 23:28         ` Benjamin Herrenschmidt
2005-05-20  6:44         ` Stefan Nickl
2005-05-20  3:51     ` Hollis Blanchard
2005-05-20  6:59       ` Wolfgang Denk
2005-05-20  4:24     ` Paul Mackerras
2005-05-20  4:28       ` Paul Mackerras
2005-05-20  4:26   ` [U-Boot-Users] " Hollis Blanchard
2005-05-20  5:04     ` Benjamin Herrenschmidt

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=1116558690.5153.87.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=u-boot@lists.denx.de \
    /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