From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Boot interface for device trees on ARM
Date: Tue, 18 May 2010 10:54:29 +0800 [thread overview]
Message-ID: <201005181054.32325.jeremy.kerr@canonical.com> (raw)
Hi all,
As we're getting closer to device tree support on ARM, I'd like to get some
input on our proposed boot interface.
Basically, I'd like to define how we pass the device tree from the bootloader
to the kernel.
My current method of doing this is through a new atag. It looks like this:
/* flattened device tree blob pointer */
#define ATAG_DEVTREE 0x5441000a
struct tag_devtree {
__u32 start; /* physical start address */
__u32 size; /* size of dtb image in bytes */
};
With ATAG_DEVTREE, we keep the existing boot interface the same (ie, machine
number in r1, atags pointer r2).
Some notes about this scheme:
+ We can easily keep compatibility with the existing boot interface; both DT
and non-DT kernels will be supported if a bootloader uses this.
- It's a little more complex, as the bootloader has to initialise the atags
structure.
- If we end up in a situation where most machines are DT-enabled, then we'll
be carrying a seldom-used structure (ie, a mostly-empty atags block) just to
provide one pointer to the kernel.
- We are now potentially carrying data in two different places - atags and
the device tree. For example, the physical memory layout and kernel command
line may be present in both.
Nicolas Pitre has suggested that we make it simpler, and specify the device
tree blob directly instead (and remove the atags). In this case, r2 would
point to the device tree blob, and r1 would be ignored.
Fortunately, both structures (atags list and device tree blob) begin with a
magic number, so it is trivial to determine whether the pointer is to an atags
list or a device tree blob.
Some notes about this scheme:
- This would break compatibility with the existing boot interface:
bootloaders that expect a DT kernel will not be able to boot a non-DT kernel.
However, does this matter? Once the machine support (ie, bootloader and
kernel) is done, we don't expect to have to enable both methods.
+ A simpler boot interface, so less to do (and get wrong) in the bootloader
+ We don't have two potential sources of boot information
Although I have been using the atag for a while, I have not pushed it to an
upstream (either qemu or the kernel), as I would like to get a firm decision
on the best method before making any commitment.
Comments and questions most welcome.
Cheers,
Jeremy
next reply other threads:[~2010-05-18 2:54 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 2:54 Jeremy Kerr [this message]
2010-05-18 4:34 ` Boot interface for device trees on ARM Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1005172341200.12758-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-05-18 5:24 ` Jeremy Kerr
[not found] ` <201005181324.45701.jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2010-05-18 8:49 ` David Gibson
2010-05-18 12:24 ` Nicolas Pitre
2010-05-18 14:06 ` Jason McMullan
[not found] ` <AANLkTikg4rQdnbFxBOUkGc_0DrKqRkp9raZ8Ck5xkLG4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-05-19 0:21 ` David Gibson
2010-05-19 7:25 ` Mitch Bradley
[not found] ` <alpine.LFD.2.00.1005180802010.12758-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-05-19 0:28 ` David Gibson
2010-05-19 1:28 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1005182109180.12758-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-05-19 6:50 ` David Gibson
2010-05-19 14:45 ` Grant Likely
2010-05-19 1:41 ` Jamie Lokier
[not found] ` <20100519014118.GD2318-yetKDKU6eevNLxjTenLetw@public.gmane.org>
2010-05-19 7:12 ` David Gibson
2010-05-19 14:21 ` Grant Likely
2010-05-19 8:50 ` Jeremy Kerr
2010-05-18 11:57 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1005180742500.12758-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-05-19 12:13 ` Grant Likely
[not found] ` <AANLkTinsOSI_TIc7Jyy4QFuFaS2d-fi0y3LMuITLyG3N-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-05-19 16:45 ` Jamie Lokier
[not found] ` <20100519164534.GE1693-yetKDKU6eevNLxjTenLetw@public.gmane.org>
2010-05-19 17:10 ` Grant Likely
2010-05-19 17:32 ` M. Warner Losh
2010-05-19 11:57 ` Grant Likely
2010-05-19 12:08 ` Russell King - ARM Linux
[not found] ` <AANLkTilJl9_NHiT1LITG7UbA9S7OYsnGMcDAsFEEx5Ob-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-05-19 17:52 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1005191055180.12758-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-05-19 20:08 ` Jamie Lokier
[not found] ` <20100519200819.GF1693-yetKDKU6eevNLxjTenLetw@public.gmane.org>
2010-05-19 20:22 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1005191614580.12758-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-05-21 16:24 ` John Rigby
2010-05-21 16:27 ` Jamie Bennett
[not found] ` <AANLkTil3vDAN4QIJJImk8MnQklisqFJq_RBc7c9VEZxl-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-05-21 19:59 ` Russell King - ARM Linux
2010-06-03 21:12 ` Grant Likely
2010-06-04 20:01 ` Grant Likely
[not found] ` <AANLkTilhqg270l-_m9raalqAPPRhvLJD9omHe8ysgLjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-04 20:33 ` John Rigby
2010-06-04 20:37 ` Jon Loeliger
[not found] ` <E1OKdeH-00053a-U2-CYoMK+44s/E@public.gmane.org>
2010-06-04 21:07 ` Grant Likely
2010-06-05 1:33 ` Jeremy Kerr
[not found] ` <201006050933.06714.jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2010-06-05 2:29 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1006042212400.30664-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2010-06-05 5:59 ` Grant Likely
2010-06-09 4:26 ` Jeremy Kerr
[not found] ` <201006091226.15438.jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2010-06-09 13:09 ` Nicolas Pitre
[not found] ` <201005181054.32325.jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2010-05-19 11:45 ` Grant Likely
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=201005181054.32325.jeremy.kerr@canonical.com \
--to=jeremy.kerr-z7wlfzj8ewms+fvcfc7uqw@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@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