From: Andrew F. Davis <afd@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/3] spl: Remove overwrite of relocated malloc limit
Date: Fri, 27 Jan 2017 10:39:19 -0600 [thread overview]
Message-ID: <20170127163920.31607-3-afd@ti.com> (raw)
In-Reply-To: <20170127163920.31607-1-afd@ti.com>
spl_init on some boards is called after stack and heap relocation, on
some platforms spl_relocate_stack_gd is called to handle setting the
limit to its value CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN when simple
SPL malloc is enabled during relocation. spl_init should then not
re-assign the old pre-relocation limit when this is defined.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
common/spl/spl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 462c3a2b97..a3808a988b 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -183,7 +183,12 @@ int spl_init(void)
int ret;
debug("spl_init()\n");
-#if defined(CONFIG_SYS_MALLOC_F_LEN)
+/*
+ * with CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN we set malloc_base and
+ * malloc_limit in spl_relocate_stack_gd
+ */
+#if defined(CONFIG_SYS_MALLOC_F_LEN) && \
+ !defined(CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN)
#ifdef CONFIG_MALLOC_F_ADDR
gd->malloc_base = CONFIG_MALLOC_F_ADDR;
#endif
--
2.11.0
next prev parent reply other threads:[~2017-01-27 16:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 16:39 [U-Boot] [PATCH v4 0/3] Add a config for AM335x High Security EVM Andrew F. Davis
2017-01-27 16:39 ` [U-Boot] [PATCH v4 1/3] malloc_simple: Add debug statements to memalign_simple Andrew F. Davis
2017-01-27 16:43 ` Tom Rini
2017-01-28 22:46 ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-01-27 16:39 ` Andrew F. Davis [this message]
2017-01-27 16:43 ` [U-Boot] [PATCH v4 2/3] spl: Remove overwrite of relocated malloc limit Tom Rini
2017-01-28 22:46 ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-02-01 23:48 ` [U-Boot] [PATCH v4 " André Przywara
2017-02-02 0:08 ` Tom Rini
2017-02-02 0:17 ` André Przywara
2017-02-02 5:35 ` Lokesh Vutla
2017-02-02 10:18 ` Andre Przywara
2017-01-27 16:39 ` [U-Boot] [PATCH v4 3/3] defconfig: Add a config for AM335x High Security EVM Andrew F. Davis
2017-01-28 22:46 ` [U-Boot] [U-Boot, v4, " Tom Rini
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=20170127163920.31607-3-afd@ti.com \
--to=afd@ti.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 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.