diff options
-rw-r--r-- | board/raspberrypi/rpi/rpi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 6b1fa5fc14..6a9384f1d6 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -268,6 +268,13 @@ int dram_init(void) gd->ram_size = msg->get_arm_mem.body.resp.mem_size; + /* + * In some configurations the memory size returned by VideoCore + * is not aligned to the section size, what is mandatory for + * the u-boot's memory setup. + */ + gd->ram_size &= ~MMU_SECTION_SIZE; + return 0; } |