From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] arm/cpu/start.c: Avoid copying device-tree when possible
Date: Tue, 29 Sep 2015 08:58:47 +0200 [thread overview]
Message-ID: <20150929065847.GO7858@pengutronix.de> (raw)
In-Reply-To: <1443247338-29171-2-git-send-email-andrew.smirnov@gmail.com>
Hi Andrey,
On Fri, Sep 25, 2015 at 11:02:18PM -0700, Andrey Smirnov wrote:
> In case of non-relocatable image device-tree blob should already be
> preloaded into memory as a part of Barebox binary upload, so there is
> no need to 'memcpy' it again
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> arch/arm/cpu/start.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
> index 7ffde7c..c461a73 100644
> --- a/arch/arm/cpu/start.c
> +++ b/arch/arm/cpu/start.c
> @@ -107,6 +107,15 @@ static noinline __noreturn void __start(unsigned long membase,
>
> switch (get_any_boarddata_magic(boarddata)) {
> case FDT_MAGIC:
> + if (!IS_ENABLED(CONFIG_RELOCATABLE)) {
> + /*
> + If Barebox is not relocatable
> + there's no need to move data around
> + */
> + barebox_boot_dtb = boarddata;
> + break;
> + }
> +
At this place it is unknown where in memory the fdt is. It could well be
somewhere in the malloc area space, so we need to move it to a safe
place before we setup malloc in the next step.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-09-29 6:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-26 6:02 [PATCH 1/2] arm/cpu/start.c: Distil some common code in __start() Andrey Smirnov
2015-09-26 6:02 ` [PATCH 2/2] arm/cpu/start.c: Avoid copying device-tree when possible Andrey Smirnov
2015-09-29 6:58 ` Sascha Hauer [this message]
2015-09-29 17:52 ` Andrey Smirnov
2015-09-30 7:00 ` Sascha Hauer
2015-09-30 17:56 ` Andrey Smirnov
2015-10-01 6:22 ` Sascha Hauer
2015-10-06 17:35 ` Andrey Smirnov
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=20150929065847.GO7858@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/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