aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Goldschmidt2019-01-26 22:13:04 +0100
committerTom Rini2019-02-02 08:19:17 -0500
commit9cc2323feebdde500f50f7abb855045dbde765cb (patch)
tree7d4c0bf226c098a560620457a6e4a96321a47bee /common
parente3b4fc9598388f47632a8c802aaa68b1154526f2 (diff)
lmb: handle more than one DRAM BANK
This fixes the automatic lmb initialization and reservation for boards with more than one DRAM bank. This fixes the CVE-2018-18439 and -18440 fixes that only allowed to load files into the firs DRAM bank from fs and via tftp. Found-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/bootm.c b/common/bootm.c
index a4618b6d2e1..7c7505f0920 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -59,8 +59,8 @@ static void boot_start_lmb(bootm_headers_t *images)
mem_start = env_get_bootm_low();
mem_size = env_get_bootm_size();
- lmb_init_and_reserve(&images->lmb, (phys_addr_t)mem_start, mem_size,
- NULL);
+ lmb_init_and_reserve_range(&images->lmb, (phys_addr_t)mem_start,
+ mem_size, NULL);
}
#else
#define lmb_reserve(lmb, base, size)