From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] image: Don't relocate ramdisk to highmem
Date: Thu, 11 Jul 2013 22:57:55 +0200 [thread overview]
Message-ID: <20130711205755.124EF383003@gemini.denx.de> (raw)
In-Reply-To: <20130711190849.GA17212@dhcp-172-17-186-34.nvidia.com>
Dear Thierry Reding,
In message <20130711190849.GA17212@dhcp-172-17-186-34.nvidia.com> you wrote:
>
> > This depends a lot on a number of things. For example, you should be
> > able to use a ramdisk in NOR flash directly, i. e. without loading it
> > to RAM first - especially if it;s a comprtessed ramdis image, and the
> > Kernel will copy/uncompress it anyway. Depending on your memory map
> > the address range of the NOR flash may be way outside (and above) that
> > of the system RAM. Are you sure your changes will not break any such
> > usage?
>
> As far as I can tell, the only place where initrd_high is used is to
> allocate an area from RAM that's used to relocate the ramdisk to. In
> case where the ramdisk is directly in NOR and isn't supposed to be
> copied anyway, this code should never be run.
Agreed. I'm not sure this is what's happening currently, though.
> So maybe one other alternative would be to check whether the current
> location of the ramdisk is within the low memory area and only relocate
> otherwise. Does that match your expectation?
Appears to make sense, indeed. But I have to admit that I'm not deep
enough into the details of this code at the moment to make a qualified
statement.
> > ...because default behaviour was do do nothing. Now you do something,
> > so this should be documented.
>
> The default behaviour was to not restrict loading to high memory at all,
> which is what the comment said:
>
> /* not set, no restrictions to load high */
> initrd_high = ~0;
>
> The patch that I posted changes the above to this:
>
> /* make sure to put ramdisk in low memory */
> initrd_high = getenv_bootm_low() + getenv_bootm_mapsize();
>
> Doesn't that accurately describe the change?
I think this shouldbe added to the function header (too).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
'What shall we do?' said Twoflower. 'Panic?' said Rincewind hope-
fully. He always held that panic was the best means of survival; back
in the olden days, his theory went, people faced with hungry sabre-
toothed tigers could be divided very simply in those who panicked and
those who stood there saying 'What a magnificent brute!' or 'Here,
pussy.' - Terry Pratchett, _The Light Fantastic_
prev parent reply other threads:[~2013-07-11 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 23:47 [U-Boot] [PATCH] image: Don't relocate ramdisk to highmem Thierry Reding
2013-07-11 9:46 ` Wolfgang Denk
2013-07-11 12:39 ` Tom Rini
2013-07-11 15:00 ` Thierry Reding
2013-07-11 18:21 ` Wolfgang Denk
2013-07-11 18:29 ` Tom Rini
2013-07-11 19:06 ` Stephen Warren
2013-07-11 20:55 ` Wolfgang Denk
2013-07-11 19:08 ` Thierry Reding
2013-07-11 20:57 ` Wolfgang Denk [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=20130711205755.124EF383003@gemini.denx.de \
--to=wd@denx.de \
--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