All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	Koen Kooi <koen@dominion.thruhere.net>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Matt Porter <matt.porter@linaro.org>,
	Guenter Roeck <linux@roeck-us.net>,
	frowand.list@gmail.com
Subject: Re: [PATCH 2/4] of: DT quirks infrastructure
Date: Thu, 19 Feb 2015 08:48:39 -0800	[thread overview]
Message-ID: <54E613E7.2020405@gmail.com> (raw)
In-Reply-To: <76BD1B22-BAED-4205-9B34-186907CE0217@konsulko.com>

On 2/19/2015 6:29 AM, Pantelis Antoniou wrote:
> Hi Mark,
> 
>> On Feb 18, 2015, at 19:31 , Mark Rutland <mark.rutland@arm.com> wrote:
>>
>>>>> +While this may in theory work, in practice it is very cumbersome
>>>>> +for the following reasons:
>>>>> +
>>>>> +1. The act of selecting a different boot device tree blob requires
>>>>> +a reasonably advanced bootloader with some kind of configuration or
>>>>> +scripting capabilities. Sadly this is not the case many times, the
>>>>> +bootloader is extremely dumb and can only use a single dt blob.
>>>>
>>>> You can have several bootloader builds, or even a single build with
>>>> something like appended DTB to get an appropriate DTB if the same binary
>>>> will otherwise work across all variants of a board.
>>>>
>>>
>>> No, the same DTB will not work across all the variants of a board.
>>
>> I wasn't on about the DTB. I was on about the loader binary, in the case
>> the FW/bootloader could be common even if the DTB couldn't.
>>
>> To some extent there must be a DTB that will work across all variants
>> (albeit with limited utility) or the quirk approach wouldn't work…
>>
> 
> That’s not correct; the only part of the DTB that needs to be common
> is the model property that would allow the quirk detection logic to fire.
> 
> So, there is a base DTB that will work on all variants, but that only means
> that it will work only up to the point that the quirk detector method
> can work. So while in recommended practice there are common subsets
> of the DTB that might work, they might be unsafe.
> 
> For instance on the beaglebone the regulator configuration is different
> between white and black, it is imperative you get them right otherwise
> you risk board damage.
> 
>>>> So it's not necessarily true that you need a complex bootloader.
>>>>
>>>
>>>>> +2. On many instances boot time is extremely critical; in some cases
>>>>> +there are hard requirements like having working video feeds in under
>>>>> +2 seconds from power-up. This leaves an extremely small time budget for
>>>>> +boot-up, as low as 500ms to kernel entry. The sanest way to get there
>>>>> +is by removing the standard bootloader from the normal boot sequence
>>>>> +altogether by having a very small boot shim that loads the kernel and
>>>>> +immediately jumps to kernel, like falcon-boot mode in u-boot does.
>>>>
>>>> Given my previous comments above I don't see why this is relevant.
>>>> You're already passing _some_ DTB here, so if you can organise for the
>>>> board to statically provide a sane DTB that's fine, or you can resort to
>>>> appended DTB if it's not possible to update the board configuration.
>>>>
>>>
>>> You’re missing the point. I can’t use the same DTB for each revision of the
>>> board. Each board is similar but it’s not identical.
>>
>> I think you've misunderstood my point. If you program the board with the
>> relevant DTB, or use appended DTB, then you will pass the correct DTB to
>> the kernel without need for quirks.
>>
>> I understand that each variant is somewhat incompatible (and hence needs
>> its own DTB).
> 
> In theory it might work, in practice this does not. Ludovic mentioned that they
> have 27 different DTBs in use at the moment. At a relatively common 60k per DTB
> that’s 27x60k = 1.6MB of DTBs, that need to be installed.

< snip >

Or you can install the correct DTB on the board.  You trust your manufacturing line
to install the correct resistors.  You trust your manufacturing line to install the
correct kernel version (eg an updated version to resolve a security issue).

I thought the DT blob was supposed to follow the same standard that other OS's or
bootloaders understood.  Are you willing to break that?  (This is one of those
ripples I mentioned in my other emails.)

-Frank

WARNING: multiple messages have this Message-ID (diff)
From: frowand.list@gmail.com (Frank Rowand)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] of: DT quirks infrastructure
Date: Thu, 19 Feb 2015 08:48:39 -0800	[thread overview]
Message-ID: <54E613E7.2020405@gmail.com> (raw)
In-Reply-To: <76BD1B22-BAED-4205-9B34-186907CE0217@konsulko.com>

On 2/19/2015 6:29 AM, Pantelis Antoniou wrote:
> Hi Mark,
> 
>> On Feb 18, 2015, at 19:31 , Mark Rutland <mark.rutland@arm.com> wrote:
>>
>>>>> +While this may in theory work, in practice it is very cumbersome
>>>>> +for the following reasons:
>>>>> +
>>>>> +1. The act of selecting a different boot device tree blob requires
>>>>> +a reasonably advanced bootloader with some kind of configuration or
>>>>> +scripting capabilities. Sadly this is not the case many times, the
>>>>> +bootloader is extremely dumb and can only use a single dt blob.
>>>>
>>>> You can have several bootloader builds, or even a single build with
>>>> something like appended DTB to get an appropriate DTB if the same binary
>>>> will otherwise work across all variants of a board.
>>>>
>>>
>>> No, the same DTB will not work across all the variants of a board.
>>
>> I wasn't on about the DTB. I was on about the loader binary, in the case
>> the FW/bootloader could be common even if the DTB couldn't.
>>
>> To some extent there must be a DTB that will work across all variants
>> (albeit with limited utility) or the quirk approach wouldn't work?
>>
> 
> That?s not correct; the only part of the DTB that needs to be common
> is the model property that would allow the quirk detection logic to fire.
> 
> So, there is a base DTB that will work on all variants, but that only means
> that it will work only up to the point that the quirk detector method
> can work. So while in recommended practice there are common subsets
> of the DTB that might work, they might be unsafe.
> 
> For instance on the beaglebone the regulator configuration is different
> between white and black, it is imperative you get them right otherwise
> you risk board damage.
> 
>>>> So it's not necessarily true that you need a complex bootloader.
>>>>
>>>
>>>>> +2. On many instances boot time is extremely critical; in some cases
>>>>> +there are hard requirements like having working video feeds in under
>>>>> +2 seconds from power-up. This leaves an extremely small time budget for
>>>>> +boot-up, as low as 500ms to kernel entry. The sanest way to get there
>>>>> +is by removing the standard bootloader from the normal boot sequence
>>>>> +altogether by having a very small boot shim that loads the kernel and
>>>>> +immediately jumps to kernel, like falcon-boot mode in u-boot does.
>>>>
>>>> Given my previous comments above I don't see why this is relevant.
>>>> You're already passing _some_ DTB here, so if you can organise for the
>>>> board to statically provide a sane DTB that's fine, or you can resort to
>>>> appended DTB if it's not possible to update the board configuration.
>>>>
>>>
>>> You?re missing the point. I can?t use the same DTB for each revision of the
>>> board. Each board is similar but it?s not identical.
>>
>> I think you've misunderstood my point. If you program the board with the
>> relevant DTB, or use appended DTB, then you will pass the correct DTB to
>> the kernel without need for quirks.
>>
>> I understand that each variant is somewhat incompatible (and hence needs
>> its own DTB).
> 
> In theory it might work, in practice this does not. Ludovic mentioned that they
> have 27 different DTBs in use at the moment. At a relatively common 60k per DTB
> that?s 27x60k = 1.6MB of DTBs, that need to be installed.

< snip >

Or you can install the correct DTB on the board.  You trust your manufacturing line
to install the correct resistors.  You trust your manufacturing line to install the
correct kernel version (eg an updated version to resolve a security issue).

I thought the DT blob was supposed to follow the same standard that other OS's or
bootloaders understood.  Are you willing to break that?  (This is one of those
ripples I mentioned in my other emails.)

-Frank

  reply	other threads:[~2015-02-19 16:48 UTC|newest]

Thread overview: 150+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 14:59 [PATCH 0/4] Device Tree Quirks & the Beaglebone Pantelis Antoniou
2015-02-18 14:59 ` Pantelis Antoniou
2015-02-18 14:59 ` Pantelis Antoniou
2015-02-18 14:59 ` [PATCH 1/4] arm: of: Add a DT quirk method after unflattening Pantelis Antoniou
2015-02-18 14:59   ` Pantelis Antoniou
2015-02-18 14:59 ` [PATCH 2/4] of: DT quirks infrastructure Pantelis Antoniou
2015-02-18 14:59   ` Pantelis Antoniou
2015-02-18 15:41   ` Mark Rutland
2015-02-18 15:41     ` Mark Rutland
2015-02-18 15:41     ` Mark Rutland
2015-02-18 15:53     ` Pantelis Antoniou
2015-02-18 15:53       ` Pantelis Antoniou
2015-02-18 15:53       ` Pantelis Antoniou
2015-02-18 16:32       ` Ludovic Desroches
2015-02-18 16:32         ` Ludovic Desroches
2015-02-18 16:32         ` Ludovic Desroches
2015-02-18 16:39         ` Pantelis Antoniou
2015-02-18 16:39           ` Pantelis Antoniou
2015-02-18 16:39           ` Pantelis Antoniou
2015-02-18 16:47           ` Ludovic Desroches
2015-02-18 16:47             ` Ludovic Desroches
2015-02-18 16:47             ` Ludovic Desroches
2015-02-18 16:46       ` Matt Porter
2015-02-18 16:46         ` Matt Porter
2015-02-18 16:46         ` Matt Porter
2015-02-18 17:31       ` Mark Rutland
2015-02-18 17:31         ` Mark Rutland
2015-02-18 17:31         ` Mark Rutland
2015-02-18 19:32         ` Guenter Roeck
2015-02-18 19:32           ` Guenter Roeck
2015-02-18 19:32           ` Guenter Roeck
2015-02-19 14:29         ` Pantelis Antoniou
2015-02-19 14:29           ` Pantelis Antoniou
2015-02-19 14:29           ` Pantelis Antoniou
2015-02-19 16:48           ` Frank Rowand [this message]
2015-02-19 16:48             ` Frank Rowand
2015-02-19 16:48             ` Frank Rowand
2015-02-19 17:00             ` Pantelis Antoniou
2015-02-19 17:00               ` Pantelis Antoniou
2015-02-19 17:00               ` Pantelis Antoniou
2015-02-19 17:30               ` Frank Rowand
2015-02-19 17:30                 ` Frank Rowand
2015-02-19 17:30                 ` Frank Rowand
2015-02-19 17:38                 ` Pantelis Antoniou
2015-02-19 17:38                   ` Pantelis Antoniou
2015-02-19 17:38                   ` Pantelis Antoniou
2015-02-19 18:01                   ` Maxime Bizon
2015-02-19 18:01                     ` Maxime Bizon
2015-02-19 18:01                     ` Maxime Bizon
2015-02-19 18:12                     ` Sylvain Rochet
2015-02-19 18:12                       ` Sylvain Rochet
2015-02-19 18:12                       ` Sylvain Rochet
2015-02-19 18:22                       ` Maxime Bizon
2015-02-19 18:22                         ` Maxime Bizon
2015-02-19 18:22                         ` Maxime Bizon
2015-02-20 14:21                   ` Peter Hurley
2015-02-20 14:21                     ` Peter Hurley
2015-02-20 14:21                     ` Peter Hurley
2015-02-20 14:35                     ` Ludovic Desroches
2015-02-20 14:35                       ` Ludovic Desroches
2015-02-20 14:35                       ` Ludovic Desroches
2015-02-20 15:00                       ` Peter Hurley
2015-02-20 15:00                         ` Peter Hurley
2015-02-20 15:00                         ` Peter Hurley
2015-02-20 15:02                         ` Pantelis Antoniou
2015-02-20 15:02                           ` Pantelis Antoniou
2015-02-20 15:02                           ` Pantelis Antoniou
2015-02-20 15:24                           ` Peter Hurley
2015-02-20 15:24                             ` Peter Hurley
2015-02-20 15:24                             ` Peter Hurley
2015-02-20 15:38                             ` Pantelis Antoniou
2015-02-20 15:38                               ` Pantelis Antoniou
2015-02-20 15:38                               ` Pantelis Antoniou
2015-02-20 16:34                               ` Peter Hurley
2015-02-20 16:34                                 ` Peter Hurley
2015-02-20 16:34                                 ` Peter Hurley
2015-02-20 16:49                                 ` Pantelis Antoniou
2015-02-20 16:49                                   ` Pantelis Antoniou
2015-02-20 16:49                                   ` Pantelis Antoniou
2015-02-20 17:30                       ` Rob Herring
2015-02-20 17:30                         ` Rob Herring
2015-02-20 17:30                         ` Rob Herring
2015-02-20 17:37                         ` Pantelis Antoniou
2015-02-20 17:37                           ` Pantelis Antoniou
2015-02-20 17:37                           ` Pantelis Antoniou
2015-02-23  7:00                         ` Ludovic Desroches
2015-02-23  7:00                           ` Ludovic Desroches
2015-02-23  7:00                           ` Ludovic Desroches
2015-02-20 14:38                     ` Pantelis Antoniou
2015-02-20 14:38                       ` Pantelis Antoniou
2015-02-20 14:38                       ` Pantelis Antoniou
2015-02-20 16:47                     ` Guenter Roeck
2015-02-20 16:47                       ` Guenter Roeck
2015-02-20 16:47                       ` Guenter Roeck
2015-02-20 18:09                       ` Peter Hurley
2015-02-20 18:09                         ` Peter Hurley
2015-02-20 18:09                         ` Peter Hurley
2015-02-20 18:48                         ` Guenter Roeck
2015-02-20 18:48                           ` Guenter Roeck
2015-02-20 18:48                           ` Guenter Roeck
2015-02-23  7:30                           ` Ludovic Desroches
2015-02-23  7:30                             ` Ludovic Desroches
2015-02-23  7:30                             ` Ludovic Desroches
2015-02-20  8:04                 ` Ludovic Desroches
2015-02-20  8:04                   ` Ludovic Desroches
2015-02-20  8:04                   ` Ludovic Desroches
2015-02-19  2:08   ` Frank Rowand
2015-02-19  2:08     ` Frank Rowand
2015-02-19 14:41     ` Pantelis Antoniou
2015-02-19 14:41       ` Pantelis Antoniou
2015-02-19 16:40       ` Frank Rowand
2015-02-19 16:40         ` Frank Rowand
2015-02-19 16:51         ` Frank Rowand
2015-02-19 16:51           ` Frank Rowand
2015-02-19 16:51           ` Frank Rowand
2015-02-20 13:23       ` Peter Hurley
2015-02-20 13:23         ` Peter Hurley
2015-02-19 18:01     ` Rob Herring
2015-02-19 18:01       ` Rob Herring
2015-02-19 18:01       ` Rob Herring
2015-02-19 18:12       ` Guenter Roeck
2015-02-19 18:12         ` Guenter Roeck
2015-02-19 18:12         ` Guenter Roeck
2015-02-20  8:16       ` Ludovic Desroches
2015-02-20  8:16         ` Ludovic Desroches
2015-02-20  8:16         ` Ludovic Desroches
2015-02-18 14:59 ` [PATCH 3/4] arm: am33xx: DT quirks for am33xx based beaglebone variants Pantelis Antoniou
2015-02-18 14:59   ` Pantelis Antoniou
2015-02-19 18:16   ` Tony Lindgren
2015-02-19 18:16     ` Tony Lindgren
2015-02-19 18:16     ` Tony Lindgren
2015-02-19 18:28     ` Pantelis Antoniou
2015-02-19 18:28       ` Pantelis Antoniou
2015-02-19 18:36       ` Tony Lindgren
2015-02-19 18:36         ` Tony Lindgren
2015-02-19 18:36         ` Tony Lindgren
2015-02-19 18:44         ` Pantelis Antoniou
2015-02-19 18:44           ` Pantelis Antoniou
2015-02-19 18:44           ` Pantelis Antoniou
2015-02-23 18:39           ` Peter Hurley
2015-02-23 18:39             ` Peter Hurley
2015-02-23 18:48             ` Pantelis Antoniou
2015-02-23 18:48               ` Pantelis Antoniou
2015-02-19 18:57         ` Guenter Roeck
2015-02-19 18:57           ` Guenter Roeck
2015-02-20 16:13       ` Jon Hunter
2015-02-20 16:13         ` Jon Hunter
2015-02-18 14:59 ` [PATCH 4/4] arm: dts: Common Black/White Beaglebone DTS using quirks Pantelis Antoniou
2015-02-18 14:59   ` Pantelis Antoniou
2015-02-18 14:59   ` Pantelis Antoniou

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=54E613E7.2020405@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ludovic.desroches@atmel.com \
    --cc=mark.rutland@arm.com \
    --cc=matt.porter@linaro.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=tony@atomide.com \
    /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.