From: Deepak Saxena <deepak_saxena@mentor.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] RFC: Not overriding device-tree memory nodes
Date: Fri, 03 Dec 2010 11:27:04 -0800 [thread overview]
Message-ID: <4CF94488.7070909@mentor.com> (raw)
I am playing with loading of multiple Linux images on individual cores
on a multi core system (P2020RDB for example) and would like to be able
to provide the memory information for each node via the DTB as opposed
to using the bootm_low and bootm_size environment variables. The env
variables work; however, setting the environment variable for each node
when we're already using the DTB to partition devices on the system
seems confusing from the perspective of someone who is trying to
configure and deploy a complex multi-core environment (8, 16, and more
cores).
Using the DTB's memory node is easily accomplished by adding some code
to the ft_board_setup() to check if a valid memory/reg property exists
(valid meaning that it is within the [bd_memstart, bd_memstart +
bd_memsize] range) and honoring that. The issue that comes up is what to
do when there is a valid range in the DTB and the user has also set a
bootm_range. For example the user is doing some quick testing and wants
to change the amount of memory for a node or two just for one run via
the variables instead of re-building the DTB. My thought is to
prioritize the environment variable over the DTB; however calling
getenv_bootm_low() returns a valid value even if the user has not set so
there's no way to tell if the user set it or not. I'd like to do one of
two following to deal with this:
1) Add a parameter to getenv_bootm_low() that returns whether the
variable is user set or a default value,
getenv_bootm_low(&user_set) for example.
2) Just make an assumption in ft_board_setup() if (bootm_low +
bootm_size == bd_memstart + bd_memsize),
the user did not set the value and we should honor what is in the DTB.
I'm leaning with option 2 as it is not intrusive to other callers and
less confusing in my opinion and I'll likely wrap the code to check for
an existing memory/reg DTB entry in a new ft_bootm_fixup() function that
can be used by any existing and future boards that implement
CONFIG_OF_BOARD_SETUP.
Thoughts?
~Deepak
reply other threads:[~2010-12-03 19:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4CF94488.7070909@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