diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-09-26 19:28:56 +0100 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2016-11-30 16:15:51 +0100 |
commit | 7a3e0f74a7c3ff83ba0607ebf8a14310ff08db60 (patch) | |
tree | 8f960e9f13eb72dfb4ac2289fa2a26666e6ced53 /arch | |
parent | e7e0469c880f9b83ea577e52d7fea4ba928a212a (diff) | |
download | u-boot-imx-7a3e0f74a7c3ff83ba0607ebf8a14310ff08db60.zip u-boot-imx-7a3e0f74a7c3ff83ba0607ebf8a14310ff08db60.tar.gz u-boot-imx-7a3e0f74a7c3ff83ba0607ebf8a14310ff08db60.tar.bz2 |
MIPS: Use ram_top, not bi_memsize, in arch_lmb_reserve
When calculating the region to reserve for the stack in
arch_lmb_reserve, make use of ram_top instead of adding bi_memsize to
CONFIG_SYS_SDRAM_BASE. This avoids overflow if the system has enough
memory to reach the end of the address space.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/lib/bootm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 0c6a4ab..9fec4ad 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -42,7 +42,7 @@ void arch_lmb_reserve(struct lmb *lmb) /* adjust sp by 4K to be safe */ sp -= 4096; - lmb_reserve(lmb, sp, CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp); + lmb_reserve(lmb, sp, gd->ram_top - sp); } static void linux_cmdline_init(void) |