diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2019-01-14 22:38:15 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-16 16:36:48 -0500 |
commit | d67f33cf4ee72fd9bc64d68cb51a77798b65cf3a (patch) | |
tree | 26bf0439372588bf6a600387650033862ae90f34 /common | |
parent | a01ae0c23f3a72b05dab623806adee4634def172 (diff) | |
download | u-boot-d67f33cf4ee72fd9bc64d68cb51a77798b65cf3a.tar.gz u-boot-d67f33cf4ee72fd9bc64d68cb51a77798b65cf3a.tar.bz2 u-boot-d67f33cf4ee72fd9bc64d68cb51a77798b65cf3a.zip |
lmb: fix allocation at end of address range
The lmb code fails if base + size of RAM overflows to zero.
Fix this by calculating end as 'base + size - 1' instead of 'base + size'
where appropriate.
Added tests to assert this is fixed.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions