* [U-Boot] [PATCH] Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
@ 2010-10-15 14:51 Gray Remlin
2010-10-15 15:29 ` Ira W. Snyder
0 siblings, 1 reply; 2+ messages in thread
From: Gray Remlin @ 2010-10-15 14:51 UTC (permalink / raw)
To: u-boot
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
addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
--
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
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
0 siblings, 0 replies; 2+ messages in thread
From: Ira W. Snyder @ 2010-10-15 15:29 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-15 15:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox