mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-24 21:20:18 +01:00
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>
This commit is contained in:
parent
e7e0469c88
commit
7a3e0f74a7
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue