diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2019-01-27 00:13:04 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-02-02 16:19:17 +0300 |
commit | 9cc2323feebdde500f50f7abb855045dbde765cb (patch) | |
tree | 7d4c0bf226c098a560620457a6e4a96321a47bee /common/bootm.c | |
parent | e3b4fc9598388f47632a8c802aaa68b1154526f2 (diff) | |
download | u-boot-9cc2323feebdde500f50f7abb855045dbde765cb.tar.xz |
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/bootm.c')
-rw-r--r-- | common/bootm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/bootm.c b/common/bootm.c index a4618b6d2e..7c7505f092 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) |