Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
PATCH 1/1 Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
Signed-off-by Gray Remlin <[email protected]>
--- arch/arm/lib/board.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/lib/board.c +2 -1
@@ -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;
PATCH 1/1 Ensure gd->ram_size end stays on 4k page boundary when 'hiding' RAM
Quoted 10 lines · Gray Remlin
Signed-off-by Gray Remlin <[email protected]>--- arch/arm/lib/board.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)arch/arm/lib/board.c +0
-0
arch/arm/lib/board.c void board_init_f (ulong bootflag) · line 537
Quoted 8 lines
arch/arm/lib/board.c +2
-1@@ -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
Quoted 7 lines
arch/arm/lib/board.c +0
-1addr =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