From: Deepak Saxena <deepak_saxena@mentor.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Honor /memory/reg node in DTB files
Date: Wed, 08 Dec 2010 10:59:08 -0800 [thread overview]
Message-ID: <4CFFD57C.1010601@mentor.com> (raw)
In-Reply-To: <20101207190936.EC285D0E429@gemini.denx.de>
On 12/07/2010 11:09 AM, Wolfgang Denk wrote:
> So far we usually had pretty static board configurations, and a static
> compile time description was all we needed. Some developers consider
> even simple extensions like auto-sizing the available RAM as
> unnecessary luxury that just inreases the boot time and memory
> footprint.
>
> When it comes to more complicated setups we should provide means for a
> more dynamic configuration - this has been discussed before, and there
> was a general agreement that the device tree would be a usable way to
> implement such a description of the hardware.
>
> So what I'm proposing is not an opposite to what you have in mind, it
> just takes it one step further, and makes the whole system consistent
> again.
>
> Waht I don't like is the tunneling of information through U-Boot,
> while U-Boot actually needs and uses this very information as well.
I won't argue with you on this front. Having U-Boot determine some board
information from the DT and determine other board information at
run-time is not consistent and confusing.
>> While we could provide a method to provide this information at build
>> time to make U-Boot, this forces a static memory partitioning on the
>> system and does not mesh well with use cases where developers may
>
> This is NOT what I suggested.
Thanks for clarifying that. You had stated "pass make U-Boot process
this information" and I read that as in passing the information to
the build ("make") process.
>> In the multi-node environments, we can't simply tell U-Boot to process
>> the DTB to determine how much memory is in the system as there is one
>> DTB per AMP node. One idea that comes to mind but that I think is not
>
> Please explain: you can use the DT to tell Linux (or other OS) how
> much memory they shoulduse, but you cannot use the same mechanism to
> pass the same information to U-Boot?
I'm not against U-Boot using this information, I'm just not sure how to
do this without adding quite a bit of complexity to the code base. We
would have to have U-Boot parse the memory nodes, validate them, check
for overlapping regions, check for holes, etc. I'm not arguing that it
is not doable, but wondering if adding this complexity is worth if the
scanning of memory and passing that information to the kernel works for
the majority of use cases. What I'm trying to do is support a special
use case, so what about wrapping support for simply passing the memory
nodes from the DT to the kernel around a CONFIG option
(CONFIG_OF_MEMORY_PASSTHROUGH?) that can be enabled by system
implementers who need this and are running on fairly controlled
environments while the larger issue of how to use the DT is hashed out?
>> the right way to go due to complexity is to have the concept of
>> nested DTBs that can define multiple operational "machines" and
>> U-Boot knows how to read this and send the right sub-DTB to the
>> right kernel image.
>
> This is a technical details that can and should be discussed when we
> have an agreement about the basic mechanism.
>
>> I'm new to U-Boot development so would like to hear about the other use
>> cases you mentioned (pointer to email threads are OK) so I can have a
>> better understanding of the overall issues.
>
> There are many board vendors who shipt boards with different
> configurations - with or without NAND flash; with or without other
> peripherals like CAN contollers, LCD, etc.; with different LCD sizes
> and types, in portrait or landscape orientation, etc. Some of these
> features can be determined by probing the hardware, others (like the
> orientation of a LCD) cannot. It is sometimes a maintenance nightmare
> to provide tens of different configurations of U-Boot for a single
> product. Being able to cinfigure available hardware through the DT,
> and using a single common binary image of U-Boot for such systems
> would be a great benefit.
I completely understand your perspective here and agree with it. DT has
made the kernel easier to maintain across multiple similar platforms so
it makes sense to leverage the same technology in U-Boot.
>> Partitioning for AMP operation is about managing what and how is running
>> on top of the bootloader. How much knowledge should the bootloader have
>> about this? The approach of providing the memory partitioning in the DTB
>> basically removes any of this knowledge from U-Boot, while the
>
> I see many use cases where this is simply not possible, because you
> need need the help of the bootloader to determine parameters that are
> not known in advance, and that thus cannot be encoded in the DT.
> Memory size if a very typical example for such a parameter. It may be
> OK for the use case you have currently in mind to use a fixed size,
> but this covers just a few systems and is not flexible enough for
> general use.
Again, I understand this, though I am not 100% sure there is a way to do
this in a completely generic way off the top of my head. There are use
cases where we must rely on U-Boot to scan and determine memory size and
there are use cases where a system is designed and not changeable and
users need to be able to reconfigure system partitioning on the fly. Are
you open to the CONFIG option as a first step towards supporting the
later use case?
Thanks,
~Deepak
next prev parent reply other threads:[~2010-12-08 18:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 0:56 [U-Boot] [PATCH] Honor /memory/reg node in DTB files Deepak Saxena
2010-12-07 6:52 ` Wolfgang Denk
2010-12-07 18:05 ` Deepak Saxena
2010-12-07 19:09 ` Wolfgang Denk
2010-12-08 18:30 ` Hollis Blanchard
2010-12-08 20:53 ` Wolfgang Denk
2010-12-08 21:08 ` Hollis Blanchard
2010-12-08 21:38 ` Wolfgang Denk
2010-12-08 22:08 ` Dan Malek
2010-12-08 22:34 ` Wolfgang Denk
2010-12-08 23:33 ` Peter Tyser
2010-12-08 23:59 ` Dan Malek
2010-12-09 10:00 ` Wolfgang Denk
2010-12-10 18:04 ` Deepak Saxena
2010-12-12 21:19 ` Wolfgang Denk
2010-12-08 18:59 ` Deepak Saxena [this message]
2010-12-08 21:00 ` Wolfgang Denk
2010-12-07 18:40 ` Hollis Blanchard
2010-12-07 19:21 ` Wolfgang Denk
2010-12-07 21:22 ` Scott Wood
2010-12-08 18:59 ` Deepak Saxena
2010-12-08 19:11 ` Scott Wood
2010-12-08 19:22 ` Dan Malek
2010-12-08 19:33 ` Scott Wood
2012-03-31 19:32 ` Marek Vasut
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=4CFFD57C.1010601@mentor.com \
--to=deepak_saxena@mentor.com \
--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