[U-Boot] [PATCH] Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
Gray Remlin
g_remlin at rocketmail.com
Fri Oct 15 16:51:48 CEST 2010
Signed-off-by: Gray Remlin <g_remlin at 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;
--
More information about the U-Boot
mailing list