From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage
Date: Sun, 12 Jun 2011 17:01:22 +0200 [thread overview]
Message-ID: <201106121701.22418.arnd@arndb.de> (raw)
In-Reply-To: <20110612143428.GI10283@n2100.arm.linux.org.uk>
On Sunday 12 June 2011 16:34:28 Russell King - ARM Linux wrote:
> I don't think you're considering real-world usage scenarios, but instead
> concentrating on the use issues. If you only do that you're boxing
> yourself into a corner and will cause a world of pain for folk who would
> just like the kernel to be usable.
>
> The information in ATAGs which will either never be in DT or which should
> override what is in DT is:
>
> - memory parameters
> - command line
> - initrd location
> - system serial number
> - system revision number
With a device-tree aware boot loader, this is exactly the kind of
information that should be put in the device tree by the boot loader,
along with other parts like local-mac-address and actual presence
of optional devices where the kernel might not have a generic way
of probing whether they are there.
> This is the kind of information which should override whatever is in
> DT because the DT contained information could well be wrong or outdated,
> and its not the kind of information that anything other than core code
> should be dealing with in any case.
Of course it should override the device tree, I'm not arguing that.
All I'm saying is that we don't need to special-case this or support
both formats once the kernel is there as long as we move the information
into appropriate DT-representation of the same data.
The attributes you are looking for are for the information you listed:
/memory/*
/chosen/bootargs
/chosen/linux,initrd-{start,end}
/serial-number
/compatible
PowerPC was facing the exact same problem, see arch/powerpc/boot/main.c
for the solution used there. The way that the boot entry point on powerpc
works is to have a boot-protocol specific entry from which all the
necessary information is taken and then put into a flattened device tree
either built from scratch (in case of real OF) or patched into a prebuilt
device tree. From there we pass the flattened device tree with all the
correct information into the actual boot stage. In some cases, the entry
points are identical and we just jump back to the start with the updated
information.
Having a complete and correct device tree is essential for instance to make
kexec work, because the new kernel will only have the information from
the device tree available but not have access to atags, uefi of open
firmware.
It may be a good idea to preserve the atags in a new property in the
device tree, so we are able to inspect them later.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: "Nicolas Pitre"
<nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Tony Lindgren" <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
"Petr Štetiar" <ynezz-knWk7/PSn+s@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage
Date: Sun, 12 Jun 2011 17:01:22 +0200 [thread overview]
Message-ID: <201106121701.22418.arnd@arndb.de> (raw)
In-Reply-To: <20110612143428.GI10283-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
On Sunday 12 June 2011 16:34:28 Russell King - ARM Linux wrote:
> I don't think you're considering real-world usage scenarios, but instead
> concentrating on the use issues. If you only do that you're boxing
> yourself into a corner and will cause a world of pain for folk who would
> just like the kernel to be usable.
>
> The information in ATAGs which will either never be in DT or which should
> override what is in DT is:
>
> - memory parameters
> - command line
> - initrd location
> - system serial number
> - system revision number
With a device-tree aware boot loader, this is exactly the kind of
information that should be put in the device tree by the boot loader,
along with other parts like local-mac-address and actual presence
of optional devices where the kernel might not have a generic way
of probing whether they are there.
> This is the kind of information which should override whatever is in
> DT because the DT contained information could well be wrong or outdated,
> and its not the kind of information that anything other than core code
> should be dealing with in any case.
Of course it should override the device tree, I'm not arguing that.
All I'm saying is that we don't need to special-case this or support
both formats once the kernel is there as long as we move the information
into appropriate DT-representation of the same data.
The attributes you are looking for are for the information you listed:
/memory/*
/chosen/bootargs
/chosen/linux,initrd-{start,end}
/serial-number
/compatible
PowerPC was facing the exact same problem, see arch/powerpc/boot/main.c
for the solution used there. The way that the boot entry point on powerpc
works is to have a boot-protocol specific entry from which all the
necessary information is taken and then put into a flattened device tree
either built from scratch (in case of real OF) or patched into a prebuilt
device tree. From there we pass the flattened device tree with all the
correct information into the actual boot stage. In some cases, the entry
points are identical and we just jump back to the start with the updated
information.
Having a complete and correct device tree is essential for instance to make
kexec work, because the new kernel will only have the information from
the device tree available but not have access to atags, uefi of open
firmware.
It may be a good idea to preserve the atags in a new property in the
device tree, so we are able to inspect them later.
Arnd
next prev parent reply other threads:[~2011-06-12 15:01 UTC|newest]
Thread overview: 146+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-12 6:06 [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage Nicolas Pitre
2011-06-12 6:06 ` Nicolas Pitre
2011-06-12 6:06 ` [PATCH 1/3] ARM: zImage: ensure it is always a multiple of 64 bits in size Nicolas Pitre
2011-06-12 6:06 ` Nicolas Pitre
2011-06-13 10:43 ` Tony Lindgren
2011-06-13 10:43 ` Tony Lindgren
2011-06-13 11:24 ` Russell King - ARM Linux
2011-06-13 11:24 ` Russell King - ARM Linux
2011-06-13 14:06 ` Nicolas Pitre
2011-06-13 14:06 ` Nicolas Pitre
2011-06-12 6:06 ` [PATCH 2/3] ARM: zImage: Allow the appending of a device tree binary Nicolas Pitre
2011-06-12 6:06 ` Nicolas Pitre
2011-06-12 15:01 ` Grant Likely
2011-06-12 15:01 ` Grant Likely
2011-06-13 10:46 ` Tony Lindgren
2011-06-13 10:46 ` Tony Lindgren
2011-06-13 11:26 ` Russell King - ARM Linux
2011-06-13 11:26 ` Russell King - ARM Linux
2011-06-13 14:08 ` Nicolas Pitre
2011-06-13 14:08 ` Nicolas Pitre
2011-06-12 6:06 ` [PATCH 3/3] ARM: zImage: make sure appended DTB doesn't get overwritten by kernel .bss Nicolas Pitre
2011-06-12 6:06 ` Nicolas Pitre
2011-06-13 10:47 ` Tony Lindgren
2011-06-13 10:47 ` Tony Lindgren
2011-06-12 8:15 ` [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage Russell King - ARM Linux
2011-06-12 8:15 ` Russell King - ARM Linux
2011-06-12 8:34 ` Shawn Guo
2011-06-12 8:34 ` Shawn Guo
2011-06-12 9:21 ` Russell King - ARM Linux
2011-06-12 9:21 ` Russell King - ARM Linux
2011-06-12 9:38 ` Shawn Guo
2011-06-12 9:38 ` Shawn Guo
2011-06-12 9:52 ` Russell King - ARM Linux
2011-06-12 9:52 ` Russell King - ARM Linux
2011-06-12 10:42 ` Shawn Guo
2011-06-12 10:42 ` Shawn Guo
2011-06-12 10:40 ` Russell King - ARM Linux
2011-06-12 10:40 ` Russell King - ARM Linux
2011-06-13 20:19 ` Dmitry Eremin-Solenikov
2011-06-13 23:04 ` David Brown
2011-06-13 23:04 ` David Brown
2011-06-13 23:13 ` Nicolas Pitre
2011-06-13 23:13 ` Nicolas Pitre
2011-06-14 7:09 ` Nicolas Pitre
2011-06-14 7:09 ` Nicolas Pitre
2011-06-14 11:25 ` Shawn Guo
2011-06-14 11:25 ` Shawn Guo
2011-06-14 14:53 ` Tony Lindgren
2011-06-14 14:53 ` Tony Lindgren
2011-06-14 17:28 ` Nicolas Pitre
2011-06-14 17:28 ` Nicolas Pitre
2011-06-14 20:32 ` Arnd Bergmann
2011-06-14 20:32 ` Arnd Bergmann
2011-06-14 21:21 ` Nicolas Pitre
2011-06-14 21:21 ` Nicolas Pitre
2011-06-14 21:42 ` Arnd Bergmann
2011-06-14 21:42 ` Arnd Bergmann
2011-06-14 22:06 ` Grant Likely
2011-06-14 22:06 ` Grant Likely
2011-06-15 8:08 ` Tony Lindgren
2011-06-15 8:08 ` Tony Lindgren
2011-06-14 22:32 ` Rob Herring
2011-06-14 22:32 ` Rob Herring
2011-06-14 23:50 ` Nicolas Pitre
2011-06-14 23:50 ` Nicolas Pitre
2011-06-15 2:09 ` Rob Herring
2011-06-15 2:09 ` Rob Herring
2011-06-15 2:21 ` Nicolas Pitre
2011-06-15 2:21 ` Nicolas Pitre
2011-06-14 21:38 ` David Brown
2011-06-14 21:38 ` David Brown
2011-06-14 23:27 ` [PATCH] Support multiple MEM tags with atags->fdt conversion David Brown
2011-06-14 23:27 ` David Brown
2011-06-15 19:50 ` Nicolas Pitre
2011-06-15 19:50 ` Nicolas Pitre
2011-06-15 20:15 ` David Brown
2011-06-15 20:15 ` David Brown
2011-06-15 20:20 ` Nicolas Pitre
2011-06-15 20:20 ` Nicolas Pitre
2011-06-16 1:43 ` David Gibson
2011-06-16 1:43 ` David Gibson
2011-06-20 4:03 ` Nicolas Pitre
2011-06-20 4:03 ` Nicolas Pitre
2011-06-20 4:53 ` David Gibson
2011-06-20 4:53 ` David Gibson
2011-06-17 20:23 ` David Brown
2011-06-17 20:23 ` David Brown
2011-06-12 11:22 ` [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage Petr Štetiar
2011-06-12 11:22 ` Petr Štetiar
2011-06-12 11:58 ` Russell King - ARM Linux
2011-06-12 11:58 ` Russell King - ARM Linux
2011-06-12 14:15 ` Arnd Bergmann
2011-06-12 14:15 ` Arnd Bergmann
2011-06-12 14:34 ` Russell King - ARM Linux
2011-06-12 14:34 ` Russell King - ARM Linux
2011-06-12 15:01 ` Arnd Bergmann [this message]
2011-06-12 15:01 ` Arnd Bergmann
2011-06-12 15:35 ` Russell King - ARM Linux
2011-06-12 15:35 ` Russell King - ARM Linux
2011-06-12 15:45 ` Nicolas Pitre
2011-06-12 15:45 ` Nicolas Pitre
2011-06-13 20:24 ` Dmitry Eremin-Solenikov
2011-06-13 22:05 ` Russell King - ARM Linux
2011-06-13 23:33 ` Grant Likely
2011-06-12 14:57 ` Grant Likely
2011-06-12 14:57 ` Grant Likely
2011-06-12 15:19 ` Russell King - ARM Linux
2011-06-12 15:19 ` Russell King - ARM Linux
2011-06-12 15:47 ` Nicolas Pitre
2011-06-12 15:47 ` Nicolas Pitre
2011-06-12 15:59 ` Russell King - ARM Linux
2011-06-12 15:59 ` Russell King - ARM Linux
2011-06-12 18:59 ` Nicolas Pitre
2011-06-12 18:59 ` Nicolas Pitre
2011-06-13 9:51 ` Tony Lindgren
2011-06-13 9:51 ` Tony Lindgren
2011-06-13 14:14 ` Nicolas Pitre
2011-06-13 14:14 ` Nicolas Pitre
2011-06-13 14:20 ` Russell King - ARM Linux
2011-06-13 14:20 ` Russell King - ARM Linux
2011-06-13 15:02 ` Tony Lindgren
2011-06-13 15:02 ` Tony Lindgren
2011-06-13 15:14 ` Nicolas Pitre
2011-06-13 15:14 ` Nicolas Pitre
2011-06-13 15:17 ` Grant Likely
2011-06-13 15:17 ` Grant Likely
2011-06-12 19:26 ` Warner Losh
2011-06-12 19:26 ` Warner Losh
2011-06-13 9:59 ` Tony Lindgren
2011-06-13 9:59 ` Tony Lindgren
2011-06-12 15:41 ` Nicolas Pitre
2011-06-12 15:41 ` Nicolas Pitre
2011-06-14 0:13 ` David Brown
2011-06-14 0:13 ` David Brown
2011-09-06 11:23 ` Linus Walleij
2011-09-06 11:23 ` Linus Walleij
2011-06-21 1:40 ` David Gibson
2011-06-21 1:40 ` David Gibson
2011-06-13 4:31 ` Grant Likely
2011-06-13 4:31 ` Grant Likely
2011-06-13 20:44 ` Nicolas Pitre
2011-06-13 20:44 ` Nicolas Pitre
2011-09-05 15:43 ` Tony Lindgren
2011-09-05 15:43 ` Tony Lindgren
2011-09-05 19:32 ` Nicolas Pitre
2011-09-05 19:32 ` Nicolas Pitre
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=201106121701.22418.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.