From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] Default to bootm_size() when CONFIG_SYS_BOOTMAPSZ is not defined
Date: Tue, 05 Apr 2011 09:34:33 -0400 [thread overview]
Message-ID: <4D9B1A69.8010707@gmail.com> (raw)
In-Reply-To: <20110328195839.10235.92568.stgit@ponder>
Hi Grant,
On 03/28/2011 03:58 PM, Grant Likely wrote:
> From: Grant Likely<grant.likely@linaro.org>
>
> This patch adds a function getenv_bootm_mapsize() for obtaining the
> size of the early mapped region accessible by the kernel during early
> boot. It defaults to CONFIG_SYS_BOOTMAPSZ, or if not defined,
> defaults to getenv_bootm_size(), which in turn defaults to the size of
> RAM.
>
> getenv_bootm_mapsize() can also be overridden with a "bootm_mapsize"
> environmental variable.
>
> Signed-off-by: Grant Likely<grant.likely@linaro.org>
> ---
> README | 16 ++++++++++++++--
> arch/powerpc/lib/bootm.c | 2 +-
> common/image.c | 22 +++++++++++++++++++---
> include/image.h | 1 +
> 4 files changed, 35 insertions(+), 6 deletions(-)
[snip]
> @@ -1207,7 +1223,7 @@ int boot_relocate_fdt (struct lmb *lmb, char **of_flat_tree, ulong *of_size)
> /* Pad the FDT by a specified amount */
> of_len = *of_size + CONFIG_SYS_FDT_PAD;
> of_start = (void *)(unsigned long)lmb_alloc_base(lmb, of_len, 0x1000,
> - CONFIG_SYS_BOOTMAPSZ + getenv_bootm_low());
> + getenv_bootm_mapsize() + getenv_bootm_low());
_________________________________________________^^^^^^^^^^^^^^^^^^
>
> if (of_start == 0) {
> puts("device tree - allocation error\n");
> @@ -1581,7 +1597,7 @@ int boot_get_cmdline (struct lmb *lmb, ulong *cmd_start, ulong *cmd_end)
> char *s;
>
> cmdline = (char *)(ulong)lmb_alloc_base(lmb, CONFIG_SYS_BARGSIZE, 0xf,
> - CONFIG_SYS_BOOTMAPSZ + getenv_bootm_low());
> + getenv_bootm_mapsize() + getenv_bootm_base());
_________________________________________________________^^^^^^^^^^^^^^^^^^
getenv_bootm_base() doesn't exist in my tree, should it have been
getenv_bootm_low()?
> if (cmdline == NULL)
> return -1;
> @@ -1617,7 +1633,7 @@ int boot_get_cmdline (struct lmb *lmb, ulong *cmd_start, ulong *cmd_end)
> int boot_get_kbd (struct lmb *lmb, bd_t **kbd)
> {
> *kbd = (bd_t *)(ulong)lmb_alloc_base(lmb, sizeof(bd_t), 0xf,
> - CONFIG_SYS_BOOTMAPSZ + getenv_bootm_low());
> + getenv_bootm_mapsize() + getenv_bootm_low());
_________________________________________________________^^^^^^^^^^^^^^^^^^
I don't have access to my 8360 board at the moment to execute test the
code. :-/
[snip]
Thanks,
gvb
next prev parent reply other threads:[~2011-04-05 13:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 19:58 [U-Boot] [PATCH 0/6] ARM device tree support improvements Grant Likely
2011-03-28 19:58 ` [U-Boot] [PATCH 1/6] Stop passing around bootmem_base value Grant Likely
2011-04-05 13:27 ` Jerry Van Baren
2011-03-28 19:58 ` [U-Boot] [PATCH 2/6] Default to bootm_size() when CONFIG_SYS_BOOTMAPSZ is not defined Grant Likely
2011-04-05 13:34 ` Jerry Van Baren [this message]
2011-03-28 19:58 ` [U-Boot] [PATCH 3/6] Remove device tree booting dependency on CONFIG_SYS_BOOTMAPSZ Grant Likely
2011-03-28 19:58 ` [U-Boot] [PATCH 4/6] Fix off-by-one error in passing initrd end address via device tree Grant Likely
2011-03-28 19:59 ` [U-Boot] [PATCH 5/6] Respect memreserve regions specified in the " Grant Likely
2011-03-28 19:59 ` [U-Boot] [PATCH 6/6] Add CONFIG_OF_LIBFDT to more boards Grant Likely
2011-04-27 22:44 ` Wolfgang Denk
2011-04-28 9:22 ` Albert ARIBAUD
2011-04-28 12:51 ` Albert ARIBAUD
2011-03-29 6:46 ` [U-Boot] [PATCH 0/6] ARM device tree support improvements Shawn Guo
2011-04-28 0:48 ` [U-Boot] [PATCH 1/2] Remove unnecessary CONFIG_SYS_BOOTMAPSZ definition Shawn Guo
2011-04-28 0:48 ` [U-Boot] [PATCH 2/2] Fix CONFIG_OF_LIBFDT redefined warning Shawn Guo
2011-05-04 6:13 ` [U-Boot] [PATCH RESEND 1/2] mx5: Remove unnecessary CONFIG_SYS_BOOTMAPSZ definition Shawn Guo
2011-05-04 6:13 ` [U-Boot] [PATCH RESEND 2/2] mx5: Fix CONFIG_OF_LIBFDT redefined warning Shawn Guo
2011-05-04 8:04 ` Stefano Babic
2011-05-04 8:44 ` Shawn Guo
2011-05-04 8:50 ` Stefano Babic
2011-05-15 14:30 ` Stefano Babic
2011-05-15 14:31 ` [U-Boot] [PATCH RESEND 1/2] mx5: Remove unnecessary CONFIG_SYS_BOOTMAPSZ definition Stefano Babic
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=4D9B1A69.8010707@gmail.com \
--to=gvb.uboot@gmail.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