From: Ira W. Snyder <iws@ovro.caltech.edu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
Date: Fri, 15 Oct 2010 08:29:03 -0700 [thread overview]
Message-ID: <20101015152902.GA28972@ovro.caltech.edu> (raw)
In-Reply-To: <4CB86A84.50807@rocketmail.com>
On Fri, Oct 15, 2010 at 03:51:48PM +0100, Gray Remlin wrote:
> Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
> ---
> arch/arm/lib/board.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 22bd2c9..c1b21f5 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -531,8 +531,9 @@ void board_init_f (ulong bootflag)
> * arch/powerpc with bootwrapper support, that recalculate the
> * memory size from the SDRAM controller setup will have to
> * get fixed.
> + * Ensure gd->ram_size end is still on a 4k page boundary.
> */
> - gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;
> + gd->ram_size -= ((CONFIG_SYS_MEM_TOP_HIDE + 0xFFF) & ~(0xFFF));
> #endif
How about this easier to read version:
gd->ram_size -= roundup(CONFIG_SYS_MEM_TOP_HIDE, 4096);
Ira
>
> addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
> --
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
prev parent reply other threads:[~2010-10-15 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 14:51 [U-Boot] [PATCH] Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM Gray Remlin
2010-10-15 15:29 ` Ira W. Snyder [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=20101015152902.GA28972@ovro.caltech.edu \
--to=iws@ovro.caltech.edu \
--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