[U-Boot] [PATCH v2] Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM

Gray Remlin
2010-10-15T18:54:18Z

Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
---
arch/arm/lib/board.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 22bd2c9..2f0d5c4 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -532,7 +532,7 @@ void board_init_f (ulong bootflag)
* memory size from the SDRAM controller setup will have to
* get fixed.
*/
- gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;
+ gd->ram_size -= roundup(CONFIG_SYS_MEM_TOP_HIDE, 4096);
#endif

addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
--