ARM: bootm: don't assume sp is in DRAM bank 0
authorStephen Warren <swarren@nvidia.com>
Fri, 5 Jan 2018 20:04:54 +0000 (13:04 -0700)
committerTom Warren <twarren@nvidia.com>
Fri, 12 Jan 2018 17:12:31 +0000 (10:12 -0700)
commit15751403b6072acabdd7ccad10013cb80b6c6a34
tree3865657a13e2595899fa08d3242288d0fbaf29d9
parentf6974712173d60830b7b8aa86b8ceac5a7cfd0c6
ARM: bootm: don't assume sp is in DRAM bank 0

arch_lmb_reserve() currently assumes that the stack pointer is within DRAM
bank 0. This is not necessarily true. Enhance the code to search through
DRAM banks until the bank that does contain SP is found, and then reserve
the tail of that bank.

Fixes: 2d1916e48bd8 ("ARM: add flat device tree support")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/lib/bootm.c