mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Jan Lübbe" <jlu@pengutronix.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Trent Piepho <tpiepho@kymetacorp.com>
Subject: Re: [PATCH 3/3] bootm: add initial FIT support
Date: Thu, 07 Jan 2016 18:00:40 +0100	[thread overview]
Message-ID: <1452186040.2915.47.camel@pengutronix.de> (raw)
In-Reply-To: <568D3C4B.3070409@pengutronix.de>

On Mi, 2016-01-06 at 17:09 +0100, Marc Kleine-Budde wrote:
[...]
> >> +	/*
> >> +	 * Put oftree/initrd close behind compressed kernel image to avoid
> >> +	 * placing it outside of the kernels lowmem.
> >> +	 */
> >> +	if (handle->initrd_size) {
> >> +		data->initrd_address = PAGE_ALIGN(data->os_res->end + SZ_1M);
> >> +		data->initrd_res = request_sdram_region("fit-initrd", data->initrd_address, handle->initrd_size);
> >> +		if (!data->initrd_res) {
> >> +			ret = -ENOMEM;
> >> +			goto err_out;
> >> +		}
> >> +		memcpy((void *)data->initrd_res->start, handle->initrd, handle->initrd_size);
> >> +	}
> >> +
> >> +	data->of_root_node = of_unflatten_dtb(handle->oftree);
> >> +	if (!data->of_root_node) {
> >> +		pr_err("unable to unflatten devicetree\n");
> >> +		ret = -EINVAL;
> >> +		goto err_out;
> >> +	}
> >> +
> >> +	/*
> >> +	 * Put devicetree right after initrd if present or after the kernel
> >> +	 * if not.
> >> +	 */
> >> +	if (data->initrd_res)
> >> +		mem_free = PAGE_ALIGN(data->initrd_res->end);
> >> +	else
> >> +		mem_free = PAGE_ALIGN(data->os_res->end + SZ_1M);
> > Why the extra 1M?
> 
> Let's see if Jan remembers, he has coded this.

This is the same as in arch/arm/lib/bootm.c. I wanted to avoid having
different behaviors.

Regards,
Jan
-- 
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

      reply	other threads:[~2016-01-07 17:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05  8:11 [PATCH 0/3] FIT Support Marc Kleine-Budde
2016-01-05  8:11 ` [PATCH 1/3] crypto: add enum Marc Kleine-Budde
2016-01-05 16:54   ` Sam Ravnborg
2016-01-06 14:39     ` Marc Kleine-Budde
2016-01-06 16:55       ` Sam Ravnborg
2016-01-05  8:11 ` [PATCH 2/3] crypto: add RSA support Marc Kleine-Budde
2016-01-05  8:11 ` [PATCH 3/3] bootm: add initial FIT support Marc Kleine-Budde
2016-01-05 10:28   ` Yegor Yefremov
2016-01-05 10:32     ` Marc Kleine-Budde
2016-01-05 10:40       ` Yegor Yefremov
2016-01-05 11:54         ` Marc Kleine-Budde
2016-01-05 13:05           ` Yegor Yefremov
2016-01-05 13:50             ` Marc Kleine-Budde
2016-01-05 13:58               ` Yegor Yefremov
2016-01-07 17:09               ` Jan Lübbe
2016-01-08 10:36                 ` Yegor Yefremov
2016-01-05 20:28   ` Trent Piepho
2016-01-06 16:09     ` Marc Kleine-Budde
2016-01-07 17:00       ` Jan Lübbe [this message]

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=1452186040.2915.47.camel@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=kernel@pengutronix.de \
    --cc=mkl@pengutronix.de \
    --cc=tpiepho@kymetacorp.com \
    /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