mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] arm/cpu/start.c: Avoid copying device-tree when possible
Date: Tue, 6 Oct 2015 10:35:33 -0700	[thread overview]
Message-ID: <CAHQ1cqFyEq4bKjX+6QxqXsj-dvqNLQiVHXp0U9WkU9-cYghCZA@mail.gmail.com> (raw)
In-Reply-To: <20151001062232.GH7858@pengutronix.de>

>> Oh, I don't think I mentioned in my previous e-mail, but I do have a
>> working Barebox image for that case. The way I have it implemented
>> right now is a vanilla, single board, no-PBL, no-relocation, i.MX6Q
>> SabreSD Barebox image with a minimal configuration. The only things I
>> had to change was device tree file -- default required to much RAM to
>> instantiate, so I had to trim it down -- and this patch to avoid
>> copying FTD that is already built-in. Oh, and I also had to disable
>> MMU, because page table takes about 1MB or RAM(I haven't had a chance
>> to spend any time trying to modify MMU code to support coarser
>> 1MB-page page table).
>>
>> The image is intended to be used by EEs to do DRAM related
>> experiments, so I do need a shell and that was the reason I went with
>> full Barebox instead of trying to cram it in PBL.
>
> Ok, I see. I think your original patch is almost fine, only the test if
> you need to copy or not needs adjustment. You have to test if the fdt is
> membase < dtb < membase + memsize. If it is you have to copy it,
> otherwise it should be fine to use it in place. Would that work?

Sorry for dropping this conversation. Unfortunately no, I don't think
this would work since in my case 'membase' is set to start of IRAM and
'memsize' is IRAM's size and since I am placing the image in IRAM that
test would come positive and the code would try to copy. What if the
condition was set to !RELOCATABLE && !PBL_IMAGE, so that if we know if
there's no PBL and no relocation we do not copy the data? Would that
be acceptable?

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-10-06 17:35 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
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 [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=CAHQ1cqFyEq4bKjX+6QxqXsj-dvqNLQiVHXp0U9WkU9-cYghCZA@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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